// File: /workspace/github_c_makefile_star2_O2/cgaebel[P]pipe/pipe.c
// Function: check_invariants
static inline void check_invariants(pipe_t* p)
{
    if(p == NULL) return;

    // p->buffer may be NULL. When it is, we must have no issued consumers.
    // It's just a way to save memory when we've deallocated all consumers
    // and people are still trying to push like idiots.
    if(p->buffer == NULL)
    {
        assertume(p->consumer_refcount == 0);
        return;
    }
    else
    {
        assertume(p->consumer_refcount != 0);
    }

    snapshot_t s = make_snapshot(p);

    assertume(s.begin);
    assertume(s.end);
    assertume(s.bufend);

    assertume(p->elem_size != 0);

    assertume(bytes_in_use(s) <= capacity(s)
            && "There are more elements in the buffer than its capacity.");

    assertume(in_bounds(s.buffer, s.begin, s.bufend));
    assertume(in_bounds(s.buffer, s.end, s.bufend));

    if(s.begin == s.end)
        assertume(bytes_in_use(s) == capacity(s));

    //assertume(in_bounds(DEFAULT_MINCAP*p->elem_size, p->min_cap, p->max_cap));
    assertume(in_bounds(p->min_cap, capacity(s) + p->elem_size, p->max_cap));
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x1501
movq 0x18(%rdi), %rcx
movq 0x40(%rdi), %rax
testq %rcx, %rcx
je 0x14f8
testq %rax, %rax
je 0x1503
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x1522
movq 0x30(%rdi), %r8
testq %r8, %r8
je 0x1541
movq 0x20(%rdi), %rdx
testq %rdx, %rdx
je 0x1560
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x157f
leaq (%rcx,%rax), %r9
movq %rdx, %r10
subq %r9, %r10
movq %rax, %r11
negq %r11
cmpq %r8, %rax
cmovaeq %r10, %r11
addq %r8, %r11
subq %rsi, %r11
movq %rdx, %r10
subq %rsi, %r10
subq %rcx, %r10
cmpq %r10, %r11
ja 0x159e
cmpq %rcx, %rax
jb 0x15bd
cmpq %rdx, %rax
ja 0x15bd
cmpq %rcx, %r8
jb 0x15dc
cmpq %rdx, %r8
ja 0x15dc
cmpq %r8, %rax
jne 0x14ca
addq %rax, %rdx
addq %rsi, %r9
subq %r9, %rdx
cmpq %r10, %rdx
jne 0x161a
addq %rsi, %r10
cmpq 0x8(%rdi), %r10
jb 0x14d9
cmpq 0x10(%rdi), %r10
jbe 0x1501
leaq 0x2d79(%rip), %rdi      # 0x4259
leaq 0x2b78(%rip), %rsi      # 0x405f
leaq 0x2c49(%rip), %rcx      # 0x4137
movl $0x206, %edx            # imm = 0x206
callq 0x1090
testq %rax, %rax
jne 0x15fb
popq %rbx
retq
leaq 0x2c4d(%rip), %rdi      # 0x4157
leaq 0x2b4e(%rip), %rsi      # 0x405f
leaq 0x2c1f(%rip), %rcx      # 0x4137
movl $0x1f1, %edx            # imm = 0x1F1
callq 0x1090
leaq 0x2c48(%rip), %rdi      # 0x4171
leaq 0x2b2f(%rip), %rsi      # 0x405f
leaq 0x2c00(%rip), %rcx      # 0x4137
movl $0x1f6, %edx            # imm = 0x1F6
callq 0x1090
leaq 0x2c31(%rip), %rdi      # 0x4179
leaq 0x2b10(%rip), %rsi      # 0x405f
leaq 0x2be1(%rip), %rcx      # 0x4137
movl $0x1f7, %edx            # imm = 0x1F7
callq 0x1090
leaq 0x2dbd(%rip), %rdi      # 0x4324
leaq 0x2af1(%rip), %rsi      # 0x405f
leaq 0x2bc2(%rip), %rcx      # 0x4137
movl $0x1f8, %edx            # imm = 0x1F8
callq 0x1090
leaq 0x2bf9(%rip), %rdi      # 0x417f
leaq 0x2ad2(%rip), %rsi      # 0x405f
leaq 0x2ba3(%rip), %rcx      # 0x4137
movl $0x1fa, %edx            # imm = 0x1FA
callq 0x1090
leaq 0x2bec(%rip), %rdi      # 0x4191
leaq 0x2ab3(%rip), %rsi      # 0x405f
leaq 0x2b84(%rip), %rcx      # 0x4137
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x1090
leaq 0x2c2a(%rip), %rdi      # 0x41ee
leaq 0x2a94(%rip), %rsi      # 0x405f
leaq 0x2b65(%rip), %rcx      # 0x4137
movl $0x1ff, %edx            # imm = 0x1FF
callq 0x1090
leaq 0x2c32(%rip), %rdi      # 0x4215
leaq 0x2a75(%rip), %rsi      # 0x405f
leaq 0x2b46(%rip), %rcx      # 0x4137
movl $0x200, %edx            # imm = 0x200
callq 0x1090
leaq 0x2b1b(%rip), %rdi      # 0x411d
leaq 0x2a56(%rip), %rsi      # 0x405f
leaq 0x2b27(%rip), %rcx      # 0x4137
movl $0x1ec, %edx            # imm = 0x1EC
callq 0x1090
leaq 0x2c19(%rip), %rdi      # 0x423a
leaq 0x2a37(%rip), %rsi      # 0x405f
leaq 0x2b08(%rip), %rcx      # 0x4137
movl $0x203, %edx            # imm = 0x203
callq 0x1090