LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe_test.c
// Function: test_basic_storage
DEF_TEST(basic_storage)
{
    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 a[] = { 0, 1, 2, 3, 4 };
    int b[] = { 9, 8, 7, 6, 5 };

    pipe_push(p, a, countof(a));
    pipe_push(p, b, countof(b));

    pipe_producer_free(p);

    int bufa[6];
    int bufb[10];

    size_t acnt = pipe_pop(c, bufa, countof(bufa)),
           bcnt = pipe_pop(c, bufb, countof(bufb));

    int expecteda[] = {
        0, 1, 2, 3, 4, 9
    };

    int expectedb[] = {
        8, 7, 6, 5
    };

    assert(array_eq_len(expecteda, bufa, acnt));
    assert(array_eq_len(expectedb, bufb, bcnt));

    pipe_consumer_free(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x12b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1930
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1970
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19b0
movq 0x2329(%rip), %rax      # 0x5700
movq %rax, -0x30(%rbp)
movq 0x2326(%rip), %rax      # 0x5708
movq %rax, -0x28(%rbp)
movl 0x2324(%rip), %eax      # 0x5710
movl %eax, -0x20(%rbp)
movq 0x232a(%rip), %rax      # 0x5720
movq %rax, -0x50(%rbp)
movq 0x2327(%rip), %rax      # 0x5728
movq %rax, -0x48(%rbp)
movl 0x2325(%rip), %eax      # 0x5730
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0x5, %edx
callq 0x2530
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movl $0x5, %edx
callq 0x2530
movq -0x10(%rbp), %rdi
callq 0x1bd0
movq -0x18(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movl $0x6, %edx
callq 0x2580
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0xa, %edx
callq 0x2580
movq %rax, -0xb0(%rbp)
movq 0x22c9(%rip), %rax      # 0x5740
movq %rax, -0xd0(%rbp)
movq 0x22c3(%rip), %rax      # 0x5748
movq %rax, -0xc8(%rbp)
movq 0x22bd(%rip), %rax      # 0x5750
movq %rax, -0xc0(%rbp)
movq 0x22cf(%rip), %rax      # 0x5770
movq %rax, -0xe0(%rbp)
movq 0x22c9(%rip), %rax      # 0x5778
movq %rax, -0xd8(%rbp)
movq -0xa8(%rbp), %rcx
shlq $0x2, %rcx
movl $0x18, %eax
cmpq %rcx, %rax
jne 0x34e7
leaq -0xd0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movl $0x18, %edx
callq 0x10a0
cmpl $0x0, %eax
je 0x34ef
jmp 0x34f1
xorl %eax, %eax
testb $0x1, %al
jne 0x34ef
jmp 0x34f1
jmp 0x3510
leaq 0x2038(%rip), %rdi      # 0x5530
leaq 0x2055(%rip), %rsi      # 0x5554
movl $0x62, %edx
leaq 0x2055(%rip), %rcx      # 0x5560
callq 0x1080
movq -0xb0(%rbp), %rcx
shlq $0x2, %rcx
movl $0x10, %eax
cmpq %rcx, %rax
jne 0x3553
leaq -0xe0(%rbp), %rax
leaq -0xa0(%rbp), %rcx
movups (%rcx), %xmm1
movups (%rax), %xmm0
pcmpeqb %xmm1, %xmm0
pmovmskb %xmm0, %eax
subl $0xffff, %eax           # imm = 0xFFFF
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x355b
jmp 0x355d
xorl %eax, %eax
testb $0x1, %al
jne 0x355b
jmp 0x355d
jmp 0x357c
leaq 0x2016(%rip), %rdi      # 0x557a
leaq 0x1fe9(%rip), %rsi      # 0x5554
movl $0x63, %edx
leaq 0x1fe9(%rip), %rcx      # 0x5560
callq 0x1080
movq -0x18(%rbp), %rdi
callq 0x1cc0
addq $0xe0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe_test.c
// Function: test_pipeline_multiplier
DEF_TEST(pipeline_multiplier)
{
    pipeline_t pipeline =
        pipe_pipeline(sizeof(testdata_t),
                      &double_elems, (void*)NULL, sizeof(testdata_t),
                      &double_elems, (void*)NULL, sizeof(testdata_t),
                      &double_elems, (void*)NULL, sizeof(testdata_t),
                      &double_elems, (void*)NULL, sizeof(testdata_t),
                      &double_elems, (void*)NULL, sizeof(testdata_t),
                      &double_elems, (void*)NULL, sizeof(testdata_t),
                      &double_elems, (void*)NULL, sizeof(testdata_t),
                      &double_elems, (void*)NULL, sizeof(testdata_t),
                      (void*)NULL
                     );

    assert(pipeline.in);
    assert(pipeline.out);

    generate_test_data(pipeline.in); pipe_producer_free(pipeline.in);
    validate_consumer(pipeline.out, 8);  pipe_consumer_free(pipeline.out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl $0x8, %ecx
leaq 0x159(%rip), %rax       # 0x3700
movq %rax, -0x18(%rbp)
xorl %edx, %edx
movl %edx, %r9d
movq %rcx, %rdi
movq %rax, %rsi
movq %r9, %rdx
movq %rax, %r8
movq $0x8, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x8, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x8, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x8, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x8, 0x60(%rsp)
movq %rax, 0x68(%rsp)
movq $0x0, 0x70(%rsp)
movq $0x8, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x8, 0x90(%rsp)
movq $0x0, 0x98(%rsp)
movb $0x0, %al
callq 0x43c0
movq %rax, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x367b
jmp 0x369a
leaq 0x1f1c(%rip), %rdi      # 0x559e
leaq 0x1ecb(%rip), %rsi      # 0x5554
movl $0xa9, %edx
leaq 0x1f15(%rip), %rcx      # 0x55aa
callq 0x1080
cmpq $0x0, -0x8(%rbp)
je 0x36a3
jmp 0x36c2
leaq 0x1f20(%rip), %rdi      # 0x55ca
leaq 0x1ea3(%rip), %rsi      # 0x5554
movl $0xaa, %edx
leaq 0x1eed(%rip), %rcx      # 0x55aa
callq 0x1080
movq -0x10(%rbp), %rdi
callq 0x37c0
movq -0x10(%rbp), %rdi
callq 0x1bd0
movq -0x8(%rbp), %rdi
movl $0x8, %esi
callq 0x3810
movq -0x8(%rbp), %rdi
callq 0x1cc0
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x372c
jmp 0x37af
movq -0x10(%rbp), %rax
movq %rsp, %rcx
movq %rcx, -0x28(%rbp)
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rdi
subq %rcx, %rdi
movq %rdi, -0x40(%rbp)
movq %rdi, %rsp
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
shlq $0x3, %rdx
callq 0x10c0
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x3797
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %edx
shll %edx
movl %edx, 0x4(%rax,%rcx,8)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x376d
movq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
callq 0x2530
movq -0x28(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe_test.c
// Function: test_parallel_multiplier
DEF_TEST(parallel_multiplier)
{
    pipeline_t pipeline =
        pipe_parallel(4,
                      sizeof(testdata_t),
                      &double_elems, (void*)NULL,
                      sizeof(testdata_t));

    assert(pipeline.in);
    assert(pipeline.out);

    generate_test_data(pipeline.in); pipe_producer_free(pipeline.in);
    validate_consumer(pipeline.out, 1); pipe_consumer_free(pipeline.out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x4, %edi
movl $0x8, %r8d
leaq -0x1ca(%rip), %rdx      # 0x3700
xorl %eax, %eax
movl %eax, %ecx
movq %r8, %rsi
callq 0x42f0
movq %rax, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x38e7
jmp 0x3906
leaq 0x1cb0(%rip), %rdi      # 0x559e
leaq 0x1c5f(%rip), %rsi      # 0x5554
movl $0xb8, %edx
leaq 0x1d1a(%rip), %rcx      # 0x561b
callq 0x1080
cmpq $0x0, -0x8(%rbp)
je 0x390f
jmp 0x392e
leaq 0x1cb4(%rip), %rdi      # 0x55ca
leaq 0x1c37(%rip), %rsi      # 0x5554
movl $0xb9, %edx
leaq 0x1cf2(%rip), %rcx      # 0x561b
callq 0x1080
movq -0x10(%rbp), %rdi
callq 0x37c0
movq -0x10(%rbp), %rdi
callq 0x1bd0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3810
movq -0x8(%rbp), %rdi
callq 0x1cc0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe_test.c
// Function: test_issue_4
DEF_TEST(issue_4)
{
    pipe_t* p = pipe_new(sizeof(struct Foo), 0);
    pipe_producer_t* producer = pipe_producer_new(p);
    pipe_consumer_t* consumer = pipe_consumer_new(p);

    for(int i = 0; i < 22; ++i)
    {
        struct Foo f;
        pipe_push(producer, &f, 1);
    }

    for(int i = 0; i < 22; ++i)
    {
        struct Foo f;
        (void)pipe_pop(consumer, &f, 1);
    }

    for(int i = 0; i < 21; ++i)
    {
        struct Foo f;
        pipe_push(producer, &f, 1);
        (void)pipe_pop(consumer, &f, 1);
    }

    pipe_producer_free(producer);
    pipe_consumer_free(consumer);

    pipe_free(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl $0xc, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x12b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1930
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1970
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x16, -0x1c(%rbp)
jge 0x39be
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
movl $0x1, %edx
callq 0x2530
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x399b
movl $0x0, -0x2c(%rbp)
cmpl $0x16, -0x2c(%rbp)
jge 0x39e8
movq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
movl $0x1, %edx
callq 0x2580
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x39c5
movl $0x0, -0x3c(%rbp)
cmpl $0x15, -0x3c(%rbp)
jge 0x3a24
movq -0x10(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0x1, %edx
callq 0x2530
movq -0x18(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movl $0x1, %edx
callq 0x2580
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x39ef
movq -0x10(%rbp), %rdi
callq 0x1bd0
movq -0x18(%rbp), %rdi
callq 0x1cc0
movq -0x8(%rbp), %rdi
callq 0x19b0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0xd0, %rsp
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x12b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1930
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1970
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19b0
movq %rsp, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x20, -0x24(%rbp)
jge 0x3abd
movl -0x24(%rbp), %ecx
movslq -0x24(%rbp), %rax
movl %ecx, -0xc0(%rbp,%rax,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3a9e
movq -0x10(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
movl $0x20, %edx
callq 0x2530
movq -0x10(%rbp), %rdi
callq 0x1bd0
movq %rsp, %rsi
addq $-0x80, %rsi
movq %rsi, -0xc8(%rbp)
movq %rsi, %rsp
movq -0x18(%rbp), %rdi
movl $0x20, %edx
callq 0x2580
movq %rax, -0x30(%rbp)
cmpq $0x20, -0x30(%rbp)
jne 0x3b07
jmp 0x3b26
leaq 0x1b2d(%rip), %rdi      # 0x563b
leaq 0x1a3f(%rip), %rsi      # 0x5554
movl $0xf5, %edx
leaq 0x1b25(%rip), %rcx      # 0x5646
callq 0x1080
movl $0x0, -0x34(%rbp)
cmpl $0x20, -0x34(%rbp)
jge 0x3b7c
movq -0xc8(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movslq -0x34(%rbp), %rcx
cmpl -0xc0(%rbp,%rcx,4), %eax
jne 0x3b50
jmp 0x3b6f
leaq 0x1b03(%rip), %rdi      # 0x565a
leaq 0x19f6(%rip), %rsi      # 0x5554
movl $0xf7, %edx
leaq 0x1adc(%rip), %rcx      # 0x5646
callq 0x1080
jmp 0x3b71
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3b2d
movq -0x18(%rbp), %rdi
callq 0x1cc0
movq -0x20(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x90, %rsp
movl $0x4, %edi
movl $0x20, %esi
callq 0x12b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x10, %esi
callq 0x2870
movq -0x8(%rbp), %rdi
callq 0x1930
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1970
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19b0
movq %rsp, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x10, -0x24(%rbp)
jge 0x3d69
movl -0x24(%rbp), %ecx
movslq -0x24(%rbp), %rax
movl %ecx, -0x80(%rbp,%rax,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3d4d
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movl $0x10, %edx
callq 0x2530
movq -0x10(%rbp), %rdi
callq 0x1bd0
movq %rsp, %rsi
addq $-0x40, %rsi
movq %rsi, -0x88(%rbp)
movq %rsi, %rsp
movq -0x18(%rbp), %rdi
movl $0x10, %edx
callq 0x2580
movq %rax, -0x30(%rbp)
cmpq $0x10, -0x30(%rbp)
jne 0x3db0
jmp 0x3dcf
leaq 0x1884(%rip), %rdi      # 0x563b
leaq 0x1796(%rip), %rsi      # 0x5554
movl $0x126, %edx            # imm = 0x126
leaq 0x18b8(%rip), %rcx      # 0x5682
callq 0x1080
movl $0x0, -0x34(%rbp)
cmpl $0x10, -0x34(%rbp)
jge 0x3e22
movq -0x88(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movslq -0x34(%rbp), %rcx
cmpl -0x80(%rbp,%rcx,4), %eax
jne 0x3df6
jmp 0x3e15
leaq 0x185d(%rip), %rdi      # 0x565a
leaq 0x1750(%rip), %rsi      # 0x5554
movl $0x128, %edx            # imm = 0x128
leaq 0x1872(%rip), %rcx      # 0x5682
callq 0x1080
jmp 0x3e17
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3dd6
movq -0x18(%rbp), %rdi
callq 0x1cc0
movq -0x20(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe_test.c
// Function: test_issue_6_c
DEF_TEST(issue_6_c)
{
  static const int NUM = 32;
  pipe_t* pipe = pipe_new(sizeof(int), NUM);
  pipe_producer_t* p = pipe_producer_new(pipe);

  issue_6_t* params = malloc(sizeof(*params));
  memset(params, 0, sizeof(*params));
  params->c = pipe_consumer_new(pipe);

  pipe_free(pipe);

  thread_create(&process_pipe_issue_6_c, params);

  int data[NUM];
  for(int i=0; i < NUM; ++i)
    data[i] = i;
  //printf("Producer pushing ok ...\n");
  params->writing = 1;
  pipe_push(p, data, NUM);
  //printf("Producer pushing should be blocked ...\n");
  pipe_push(p, data, NUM);
  //printf("Producer unblocked ...\n");
  params->writing = 0;
  thread_sleep(1);
  assert(params->read == NUM);

  free(params);
  pipe_producer_free(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movl $0x4, %edi
movl $0x20, %esi
callq 0x12b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1930
movq %rax, -0x10(%rbp)
movl $0x10, %edi
callq 0x10f0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x1090
movq -0x8(%rbp), %rdi
callq 0x1970
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
callq 0x19b0
movq -0x18(%rbp), %rsi
leaq 0x100(%rip), %rdi       # 0x3fb0
callq 0x3f80
movq %rsp, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x20, -0x24(%rbp)
jge 0x3ee2
movl -0x24(%rbp), %ecx
movslq -0x24(%rbp), %rax
movl %ecx, -0xb0(%rbp,%rax,4)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3ec3
movq -0x18(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x10(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x20, %edx
callq 0x2530
movq -0x10(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x20, %edx
callq 0x2530
movq -0x18(%rbp), %rax
movl $0x0, 0x8(%rax)
movl $0x1, %edi
callq 0x1140
movq -0x18(%rbp), %rax
cmpl $0x20, 0xc(%rax)
jne 0x3f38
jmp 0x3f57
leaq 0x1759(%rip), %rdi      # 0x5698
leaq 0x160e(%rip), %rsi      # 0x5554
movl $0x181, %edx            # imm = 0x181
leaq 0x175a(%rip), %rcx      # 0x56ac
callq 0x1080
movq -0x18(%rbp), %rdi
callq 0x1030
movq -0x10(%rbp), %rdi
callq 0x1bd0
movq -0x20(%rbp), %rax
movq %rax, %rsp
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x1, %edi
callq 0x1140
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x3fda
jmp 0x3ff9
leaq 0x16e1(%rip), %rdi      # 0x56c2
leaq 0x156c(%rip), %rsi      # 0x5554
movl $0x158, %edx            # imm = 0x158
leaq 0x16d9(%rip), %rcx      # 0x56cd
callq 0x1080
movq %rsp, %rax
movq %rax, -0x18(%rbp)
movq %rsp, %rsi
addq $-0x80, %rsi
movq %rsi, -0x30(%rbp)
movq %rsi, %rsp
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x20, %edx
callq 0x2580
movq %rax, -0x20(%rbp)
cmpq $0x20, -0x20(%rbp)
jne 0x402c
jmp 0x404b
leaq 0x1608(%rip), %rdi      # 0x563b
leaq 0x151a(%rip), %rsi      # 0x5554
movl $0x15b, %edx            # imm = 0x15B
leaq 0x1687(%rip), %rcx      # 0x56cd
callq 0x1080
movl $0x0, -0x24(%rbp)
cmpl $0x20, -0x24(%rbp)
jge 0x4096
movq -0x30(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x24(%rbp), %eax
jne 0x406a
jmp 0x4089
leaq 0x1681(%rip), %rdi      # 0x56f2
leaq 0x14dc(%rip), %rsi      # 0x5554
movl $0x15d, %edx            # imm = 0x15D
leaq 0x1649(%rip), %rcx      # 0x56cd
callq 0x1080
jmp 0x408b
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4052
movq -0x10(%rbp), %rax
movl $0x20, 0xc(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x1cc0
movq -0x18(%rbp), %rax
movq %rax, %rsp
xorl %eax, %eax
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x4121
jmp 0x4140
leaq 0x147f(%rip), %rdi      # 0x55a7
leaq 0x1651(%rip), %rsi      # 0x5780
movl $0x61, %edx
leaq 0x1651(%rip), %rcx      # 0x578c
callq 0x1080
cmpq $0x0, -0x20(%rbp)
je 0x4149
jmp 0x4168
leaq 0x1483(%rip), %rdi      # 0x55d3
leaq 0x1629(%rip), %rsi      # 0x5780
movl $0x62, %edx
leaq 0x1629(%rip), %rcx      # 0x578c
callq 0x1080
cmpq $0x0, -0x10(%rbp)
je 0x4171
jmp 0x4190
leaq 0x1666(%rip), %rdi      # 0x57de
leaq 0x1601(%rip), %rsi      # 0x5780
movl $0x63, %edx
leaq 0x1601(%rip), %rcx      # 0x578c
callq 0x1080
movl $0x20, %edi
callq 0x10f0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x40(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq -0x20(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rsi
leaq 0x44(%rip), %rdi        # 0x4230
callq 0x4200
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x18(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1030
movq -0x28(%rbp), %rdi
callq 0x1270
movq %rax, %rdi
shlq $0x7, %rdi
callq 0x10f0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x80, %edx
callq 0x2580
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x42b5
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq *%rax
jmp 0x4281
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
xorl %edx, %edx
movq %rdx, %rdi
movq %rdx, %rsi
callq *%rax
movq -0x30(%rbp), %rdi
callq 0x1030
movq -0x28(%rbp), %rdi
callq 0x1cc0
movq -0x10(%rbp), %rdi
callq 0x1bd0
xorl %eax, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12b0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12b0
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpq $0x0, %rax
je 0x437f
movq -0x40(%rbp), %rdi
callq 0x1970
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x1930
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %rax, %rcx
callq 0x4100
jmp 0x432e
movq -0x40(%rbp), %rdi
callq 0x1930
movq %rax, -0x10(%rbp)
movq -0x48(%rbp), %rdi
callq 0x1970
movq %rax, -0x8(%rbp)
movq -0x40(%rbp), %rdi
callq 0x19b0
movq -0x48(%rbp), %rdi
callq 0x19b0
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
testb %al, %al
je 0x43fe
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movq %r8, -0xe0(%rbp)
movq %rcx, -0xe8(%rbp)
movq %rdx, -0xf0(%rbp)
movq %rsi, -0xf8(%rbp)
movq %rdi, -0x18(%rbp)
leaq -0x100(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x8, -0x30(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x12b0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x40c0
movq %rax, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x44a0
movq %rax, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq -0x38(%rbp), %rdi
callq 0x19b0
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
je 0x46dd
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x1119(%rip), %rdi      # 0x57e3
movb $0x0, %al
callq 0x1060
movl $0xff, -0x4(%rbp)
jmp 0x4818
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1120
movl %eax, -0x14(%rbp)
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x12b0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1930
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x7, -0x2c(%rbp)
jge 0x4792
movslq -0x2c(%rbp), %rcx
leaq 0x39bc(%rip), %rax      # 0x80e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rdi
callq 0x1970
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rdi
callq 0x19b0
movl $0x4, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x12b0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1930
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rdi
callq 0x4830
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4713
movl $0x8, -0x50(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1970
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rax
movq %rax, 0x39cf(%rip)      # 0x8188
movq -0x48(%rbp), %rax
movq %rax, 0x39cc(%rip)      # 0x8190
movq -0x40(%rbp), %rax
movq %rax, 0x39c9(%rip)      # 0x8198
movq -0x20(%rbp), %rdi
callq 0x19b0
leaq 0x3901(%rip), %rdi      # 0x80e0
addq $0xc0, %rdi
addq $-0x18, %rdi
callq 0x4830
movq -0x28(%rbp), %rdi
leaq -0x14(%rbp), %rsi
movl $0x1, %edx
callq 0x2530
movq 0x3998(%rip), %rdi      # 0x81a0
xorl %eax, %eax
movl %eax, %esi
callq 0x1130
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x14(%rbp), %rsi
movl $0x1, %edx
callq 0x2580
cmpq $0x0, %rax
je 0x48d4
cmpl $0x0, -0x14(%rbp)
jne 0x48b3
movq -0x10(%rbp), %rax
movl (%rax), %esi
leaq 0xf78(%rip), %rdi       # 0x5822
movb $0x0, %al
callq 0x1060
jmp 0x48d4
movl -0x14(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x14(%rbp), %rsi
movl $0x1, %edx
callq 0x2530
jmp 0x487b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1bd0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1cc0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
xorl %edi, %edi
callq 0x39e40
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x12770
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x12e69
jmp 0x12e3b
movq 0x9d1ae(%rip), %rax     # 0xafff0
movq (%rax), %rdi
leaq 0x6b1b8(%rip), %rsi     # 0x7e004
leaq 0x6b1ce(%rip), %rdx     # 0x7e021
movl $0x40, %ecx
movb $0x0, %al
callq 0x125f0
movl $0x1, %edi
callq 0x12a70
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x40(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq -0x40(%rbp), %rcx
addq 0xa8(%rax), %rcx
movq %rcx, 0xa8(%rax)
movq -0x18(%rbp), %rax
movl $0xd, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x20(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
addq $0x268, %rax            # imm = 0x268
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movabsq $-0x1000000000000, %rsi # imm = 0xFFFF000000000000
callq 0x7b610
movq %rax, -0x28(%rbp)
movabsq $-0x7000000000000, %rdi # imm = 0xFFF9000000000000
callq 0x7b460
movq -0x38(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x697e0
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq -0xc(%rbp), %rdi
callq 0x12ad0
leaq -0xc(%rbp), %rdi
movl $0x1, %esi
callq 0x123a0
movq -0x8(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x12bb0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x0, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x13256
movslq -0xc(%rbp), %rax
shlq $0x3, %rax
movq %rax, -0x20(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq -0x20(%rbp), %rcx
addq 0xa8(%rax), %rcx
movq %rcx, 0xa8(%rax)
movslq -0xc(%rbp), %rdi
shlq $0x3, %rdi
callq 0x12770
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x13254
jmp 0x13226
movq 0x9cdc3(%rip), %rax     # 0xafff0
movq (%rax), %rdi
leaq 0x6adcd(%rip), %rsi     # 0x7e004
leaq 0x6ae0b(%rip), %rdx     # 0x7e049
movl $0x27, %ecx
movb $0x0, %al
callq 0x125f0
movl $0x1, %edi
callq 0x12a70
jmp 0x13256
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x3, %edi
movl $0x20, %esi
callq 0x39e40
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movslq -0xc(%rbp), %rdi
shlq $0x3, %rdi
callq 0x12770
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x13349
jmp 0x1331b
movq 0x9ccce(%rip), %rax     # 0xafff0
movq (%rax), %rdi
leaq 0x6acd8(%rip), %rsi     # 0x7e004
leaq 0x6ad16(%rip), %rdx     # 0x7e049
movl $0x44, %ecx
movb $0x0, %al
callq 0x125f0
movl $0x1, %edi
callq 0x12a70
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
movslq -0xc(%rbp), %rdx
shlq $0x3, %rdx
callq 0x6ae40
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jg 0x1339f
jmp 0x13461
movslq -0xc(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpq $0x7fffffff, -0x28(%rbp) # imm = 0x7FFFFFFF
jle 0x133c1
movq $0x7fffffff, -0x28(%rbp) # imm = 0x7FFFFFFF
movq -0x28(%rbp), %rax
movl %eax, -0xc(%rbp)
movq -0x20(%rbp), %rdi
movslq -0xc(%rbp), %rsi
shlq $0x3, %rsi
callq 0x12840
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x13415
jmp 0x133e7
movq 0x9cc02(%rip), %rax     # 0xafff0
movq (%rax), %rdi
leaq 0x6ac0c(%rip), %rsi     # 0x7e004
leaq 0x6ac4a(%rip), %rdx     # 0x7e049
movl $0x54, %ecx
movb $0x0, %al
callq 0x125f0
movl $0x1, %edi
callq 0x12a70
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
subl 0x14(%rcx), %eax
cltq
shlq $0x3, %rax
movq %rax, -0x30(%rbp)
movq %fs:0x0, %rax
leaq -0x348(%rax), %rax
movq -0x30(%rbp), %rcx
addq 0xa8(%rax), %rcx
movq %rcx, 0xa8(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jge 0x1348a
jmp 0x1350a
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jle 0x13500
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl $0x1, %edx
callq 0x13370
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x134fe
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movslq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq -0x28(%rbp), %rcx
movq %rax, %rdx
movq -0x20(%rbp), %rax
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x134b1
jmp 0x13500
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x10(%rax)
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x7fffffff, 0x10(%rax) # imm = 0x7FFFFFFF
jne 0x13539
leaq 0x6ab26(%rip), %rdi     # 0x7e05a
callq 0x1ad60
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl $0x2, %edx
callq 0x13370
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x10(%rcx), %rcx
movq -0x8(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x135b8
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rdx
movl 0x10(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x10(%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
jmp 0x135cb
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x13615
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x10(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
jmp 0x13628
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/asm.c
// Function: janet_asm_reverse_lookup
static const JanetInstructionDef *janet_asm_reverse_lookup(uint32_t instr) {
    size_t i;
    uint32_t opcode = instr & 0x7F;
    for (i = 0; i < sizeof(janet_ops) / sizeof(JanetInstructionDef); i++) {
        const JanetInstructionDef *def = janet_ops + i;
        if (def->opcode == opcode)
            return def;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0x1c(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x4d, -0x18(%rbp)
jae 0x1627b
movq -0x18(%rbp), %rcx
leaq 0x944e6(%rip), %rax     # 0xaa730
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x1626b
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x16283
jmp 0x1626d
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x16238
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x2, %edi
callq 0x6a740
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rdi
callq 0x6a7a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x3, %edi
callq 0x6a740
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rdi
callq 0x6a7a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x4, %edi
callq 0x6a740
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rdi
callq 0x6a7a0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x70(%rax), %edi
callq 0x13180
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x70(%rcx), %eax
jge 0x169e9
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %edi
callq 0x15f50
movq -0x38(%rbp), %rcx
movq %rax, %rdx
movq -0x30(%rbp), %rax
movq %rdx, -0x28(%rbp)
movq -0x28(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x16993
movq -0x10(%rbp), %rax
movl 0x70(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rdi
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
callq 0x7b610
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x6c(%rax), %edi
callq 0x13180
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x6c(%rcx), %eax
jge 0x16e0a
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq -0x10(%rbp), %rdx
movq 0x18(%rdx), %rdx
movslq -0x1c(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x16dd3
movq -0x10(%rbp), %rax
movl 0x6c(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rdi
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
callq 0x7b610
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)