// File: /workspace/github_c_makefile_star2_O0/cgaebel[P]pipe/pipe.c
// Function: process_push
static inline char* process_push(snapshot_t s,
                                const void* restrict elems,
                                size_t bytes_to_copy
                               )
{
    assertume(bytes_to_copy != 0);

    // This shouldn't be necessary.
    //s.end = wrap_ptr_if_necessary(s.buffer, s.end, s.bufend);
    assertume(s.end != s.bufend);

    // If we currently have a nowrap buffer, we may have to wrap the new
    // elements. Copy as many as we can at the end, then start copying into the
    // beginning. This basically reduces the problem to only deal with wrapped
    // buffers, which can be dealt with using a single offset_memcpy.
    if(!wraps_around(s))
    {
        size_t at_end = min(bytes_to_copy, (size_t)(s.bufend - s.end));

        s.end = offset_memcpy(s.end, elems, at_end);

        elems = (const char*)elems + at_end;
        bytes_to_copy -= at_end;
    }

    // Now copy any remaining data...
    if(unlikely(bytes_to_copy))
    {
        s.end = wrap_ptr_if_necessary(s.buffer, s.end, s.bufend);
        s.end = offset_memcpy(s.end, elems, bytes_to_copy);
    }

    s.end = wrap_ptr_if_necessary(s.buffer, s.end, s.bufend);

    // ...and update the end pointer!
    return s.end;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2331
jmp 0x2350
leaq 0x3010(%rip), %rdi      # 0x5348
leaq 0x2d20(%rip), %rsi      # 0x505f
movl $0x325, %edx            # imm = 0x325
leaq 0x3010(%rip), %rcx      # 0x535b
callq 0x1080
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rax
cmpq 0x8(%rcx), %rax
je 0x2360
jmp 0x237f
leaq 0x3031(%rip), %rdi      # 0x5398
leaq 0x2cf1(%rip), %rsi      # 0x505f
movl $0x329, %edx            # imm = 0x329
leaq 0x2fe1(%rip), %rcx      # 0x535b
callq 0x1080
movq -0x20(%rbp), %rcx
movq 0x20(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x2c30
testb $0x1, %al
jne 0x241d
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rdx), %rcx
movq 0x18(%rdx), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
ja 0x23c7
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x23da
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rax
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2c60
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x245f
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq 0x18(%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x2ca0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x2c60
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq 0x18(%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x2ca0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rax), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)