// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x1628
jmp 0x191f
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x1664
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x1640
jmp 0x165f
leaq 0x3b1a(%rip), %rdi      # 0x5161
leaq 0x3a11(%rip), %rsi      # 0x505f
movl $0x1ec, %edx            # imm = 0x1EC
leaq 0x3b21(%rip), %rcx      # 0x517b
callq 0x1080
jmp 0x191f
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x1671
jmp 0x1690
leaq 0x3b23(%rip), %rdi      # 0x519b
leaq 0x39e0(%rip), %rsi      # 0x505f
movl $0x1f1, %edx            # imm = 0x1F1
leaq 0x3af0(%rip), %rcx      # 0x517b
callq 0x1080
jmp 0x1692
movq -0x8(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x29a0
cmpq $0x0, -0x20(%rbp)
je 0x16a8
jmp 0x16c7
leaq 0x3b06(%rip), %rdi      # 0x51b5
leaq 0x39a9(%rip), %rsi      # 0x505f
movl $0x1f6, %edx            # imm = 0x1F6
leaq 0x3ab9(%rip), %rcx      # 0x517b
callq 0x1080
cmpq $0x0, -0x18(%rbp)
je 0x16d0
jmp 0x16ef
leaq 0x3ae6(%rip), %rdi      # 0x51bd
leaq 0x3981(%rip), %rsi      # 0x505f
movl $0x1f7, %edx            # imm = 0x1F7
leaq 0x3a91(%rip), %rcx      # 0x517b
callq 0x1080
cmpq $0x0, -0x28(%rbp)
je 0x16f8
jmp 0x1717
leaq 0x3ca2(%rip), %rdi      # 0x53a1
leaq 0x3959(%rip), %rsi      # 0x505f
movl $0x1f8, %edx            # imm = 0x1F8
leaq 0x3a69(%rip), %rcx      # 0x517b
callq 0x1080
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1723
jmp 0x1742
leaq 0x3a99(%rip), %rdi      # 0x51c3
leaq 0x392e(%rip), %rsi      # 0x505f
movl $0x1fa, %edx            # imm = 0x1FA
leaq 0x3a3e(%rip), %rcx      # 0x517b
callq 0x1080
movq -0x10(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x30(%rbp), %xmm0
movups -0x20(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x24b0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x30(%rbp), %xmm0
movups -0x20(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x2490
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
ja 0x179a
movb $0x1, %al
testb $0x1, %al
jne 0x1798
jmp 0x179a
jmp 0x17b9
leaq 0x3a6d(%rip), %rdi      # 0x520e
leaq 0x38b7(%rip), %rsi      # 0x505f
movl $0x1fd, %edx            # imm = 0x1FD
leaq 0x39c7(%rip), %rcx      # 0x517b
callq 0x1080
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jb 0x17cf
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x17cf
jmp 0x17ee
leaq 0x3a95(%rip), %rdi      # 0x526b
leaq 0x3882(%rip), %rsi      # 0x505f
movl $0x1ff, %edx            # imm = 0x1FF
leaq 0x3992(%rip), %rcx      # 0x517b
callq 0x1080
movq -0x18(%rbp), %rax
cmpq -0x30(%rbp), %rax
jb 0x1804
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x1804
jmp 0x1823
leaq 0x3a87(%rip), %rdi      # 0x5292
leaq 0x384d(%rip), %rsi      # 0x505f
movl $0x200, %edx            # imm = 0x200
leaq 0x395d(%rip), %rcx      # 0x517b
callq 0x1080
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x189e
movq -0x10(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x30(%rbp), %xmm0
movups -0x20(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x24b0
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x30(%rbp), %xmm0
movups -0x20(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x2490
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jne 0x187d
jmp 0x189c
leaq 0x3a33(%rip), %rdi      # 0x52b7
leaq 0x37d4(%rip), %rsi      # 0x505f
movl $0x203, %edx            # imm = 0x203
leaq 0x38e4(%rip), %rcx      # 0x517b
callq 0x1080
jmp 0x189e
movq -0x10(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x30(%rbp), %xmm0
movups -0x20(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x2490
movq -0x8(%rbp), %rcx
addq (%rcx), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jb 0x1900
movq -0x10(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x20(%rax)
movups -0x30(%rbp), %xmm0
movups -0x20(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x2490
movq -0x8(%rbp), %rcx
addq (%rcx), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
ja 0x1900
jmp 0x191f
leaq 0x39cf(%rip), %rdi      # 0x52d6
leaq 0x3751(%rip), %rsi      # 0x505f
movl $0x206, %edx            # imm = 0x206
leaq 0x3861(%rip), %rcx      # 0x517b
callq 0x1080
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)