LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/tests/catch.hpp
// Function: Catch::ConsoleReporter::AssertionPrinter::printOriginalExpression() const
void printOriginalExpression() const {
                if( result.hasExpression() ) {
                    Colour colourGuard( Colour::OriginalExpression );
                    stream  << "  ";
                    stream << result.getExpressionInMacro();
                    stream << "\n";
                }
            }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq 0x10(%rdi), %rax
cmpq $0x0, 0x50(%rax)
je 0x2ea0f
movq %rdi, %rbx
movb $0x0, 0x7(%rsp)
movl $0x5, %edi
callq 0xe19c
movq (%rbx), %rdi
leaq 0x16acf(%rip), %rsi     # 0x4547b
movl $0x2, %edx
callq 0xb530
movq (%rbx), %r14
movq 0x10(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0xe698
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0xb530
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2e9f4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq (%rbx), %rdi
leaq 0x16fe2(%rip), %rsi     # 0x459e0
movl $0x1, %edx
callq 0xb530
xorl %edi, %edi
callq 0xe19c
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x14d37
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ea44
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb4a0
jmp 0x2ea44
jmp 0x2ea41
movq %rax, %rbx
leaq 0x7(%rsp), %rdi
callq 0xe206
movq %rbx, %rdi
callq 0xb820
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/tests/catch.hpp
// Function: Catch::ConsoleReporter::AssertionPrinter::printReconstructedExpression() const
void printReconstructedExpression() const {
                if( result.hasExpandedExpression() ) {
                    stream << "with expansion:\n";
                    Colour colourGuard( Colour::ReconstructedExpression );
                    stream << Text( result.getExpandedExpression(), TextAttributes().setIndent(2) ) << "\n";
                }
            }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %r14
movq 0x10(%rdi), %rdi
callq 0xe822
testb %al, %al
je 0x2eb95
movq (%r14), %rdi
leaq 0x170ae(%rip), %rsi     # 0x45b32
movl $0x10, %edx
callq 0xb530
movb $0x0, 0x7(%rsp)
movl $0x6, %edi
callq 0xe19c
movq (%r14), %rbx
movq 0x10(%r14), %rax
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x70(%rax), %rsi
movq 0x78(%rax), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x319ec
leaq 0x80(%rsp), %rdx
movq $-0x1, (%rdx)
movq $0x4f, 0x10(%rdx)
movb $0x9, 0x18(%rdx)
movq $0x2, 0x8(%rdx)
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2482c
movq 0x68(%rsp), %r12
movq 0x70(%rsp), %r13
cmpq %r13, %r12
je 0x2eb3b
leaq 0x16ed6(%rip), %r14     # 0x459e0
cmpq 0x68(%rsp), %r12
je 0x2eb21
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb530
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
callq 0xb530
addq $0x20, %r12
cmpq %r13, %r12
jne 0x2eb0a
leaq 0x16e9e(%rip), %rsi     # 0x459e0
movl $0x1, %edx
movq %rbx, %rdi
callq 0xb530
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
callq 0x13df2
movq -0x40(%rbx), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2eb77
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2eb8e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb4a0
xorl %edi, %edi
callq 0xe19c
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x14d37
jmp 0x2ebba
movq %rax, %rbx
jmp 0x2ebc7
movq %rax, %rbx
jmp 0x2ebde
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x24db0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2ebde
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb4a0
leaq 0x7(%rsp), %rdi
callq 0xe206
movq %rbx, %rdi
callq 0xb820
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/tests/catch.hpp
// Function: Catch::ConsoleReporter::AssertionPrinter::printMessage() const
void printMessage() const {
                if( !messageLabel.empty() )
                    stream << messageLabel << ":" << "\n";
                for( std::vector<MessageInfo>::const_iterator it = messages.begin(), itEnd = messages.end();
                        it != itEnd;
                        ++it ) {
                    // If this assertion is a warning ignore any INFO messages
                    if( printInfoMessages || it->type != ResultWas::Info )
                        stream << Text( it->message, TextAttributes().setIndent(2) ) << "\n";
                }
            }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movq 0x48(%rdi), %rdx
testq %rdx, %rdx
je 0x2ec44
movq (%rbx), %rdi
movq 0x40(%rbx), %rsi
callq 0xb530
movq %rax, %r14
leaq 0x16039(%rip), %rsi     # 0x44c5c
movl $0x1, %edx
movq %rax, %rdi
callq 0xb530
leaq 0x16da9(%rip), %rsi     # 0x459e0
movl $0x1, %edx
movq %r14, %rdi
callq 0xb530
movq 0x80(%rbx), %r14
movq 0x88(%rbx), %rax
movq %rax, 0x8(%rsp)
cmpq %rax, %r14
je 0x2ed33
leaq 0x16d79(%rip), %r13     # 0x459e0
cmpb $0x0, 0x98(%rbx)
jne 0x2ec7b
cmpl $0x1, 0x48(%r14)
je 0x2ed24
movq (%rbx), %rbp
leaq 0x50(%r14), %rsi
movq $-0x1, 0x10(%rsp)
movq $0x4f, 0x20(%rsp)
movb $0x9, 0x28(%rsp)
movq $0x2, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x2482c
movq 0x70(%rsp), %r12
movq 0x78(%rsp), %r15
cmpq %r15, %r12
je 0x2ecee
cmpq 0x70(%rsp), %r12
je 0x2ecd7
movl $0x1, %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0xb530
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbp, %rdi
callq 0xb530
addq $0x20, %r12
jmp 0x2ecbb
movl $0x1, %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0xb530
leaq 0x70(%rsp), %rdi
callq 0x13df2
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2ed24
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb4a0
addq $0x78, %r14
cmpq 0x8(%rsp), %r14
jne 0x2ec67
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2ed47
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x24db0
movq %rbx, %rdi
callq 0xb820
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/tests/catch.hpp
// Function: Catch::ConsoleReporter::SummaryColumn::addRow(unsigned long)
SummaryColumn addRow( std::size_t count ) {
                std::ostringstream oss;
                oss << count;
                std::string row = oss.str();
                for( std::vector<std::string>::iterator it = rows.begin(); it != rows.end(); ++it ) {
                    while( it->size() < row.size() )
                        *it = " " + *it;
                    while( it->size() > row.size() )
                        row = " " + row;
                }
                rows.push_back( row );
                return *this;
            }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %r12
movq %r12, %rdi
callq 0xb5f0
movq %r12, %rdi
movq %r15, %rsi
callq 0xb300
movq %rbx, 0x28(%rsp)
leaq 0x58(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0xb6f0
movq 0x28(%r14), %r15
cmpq 0x30(%r14), %r15
je 0x2f791
leaq 0x40(%rsp), %rbx
leaq 0x8(%rsp), %r12
movq 0x8(%r12), %rax
leaq 0x15295(%rip), %r13     # 0x4498f
leaq 0x30(%rsp), %rbp
movq 0x8(%r15), %rcx
cmpq %rax, %rcx
jae 0x2f743
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x149d5
movq %r15, %rdi
movq %rbp, %rsi
callq 0xb590
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2f738
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq 0x8(%r15), %rcx
movq 0x10(%rsp), %rax
jmp 0x2f703
cmpq %rax, %rcx
jbe 0x2f783
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x149d5
movq %r12, %rdi
movq %rbp, %rsi
callq 0xb590
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x2f778
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq 0x10(%rsp), %rax
cmpq %rax, 0x8(%r15)
ja 0x2f748
addq $0x20, %r15
cmpq 0x30(%r14), %r15
jne 0x2f6ff
leaq 0x28(%r14), %r15
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x23a92
movq 0x28(%rsp), %r12
leaq 0x10(%r12), %rbx
movq %rbx, (%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x319ec
movl 0x20(%r14), %eax
movl %eax, 0x20(%r12)
leaq 0x28(%r12), %rdi
movq %r15, %rsi
callq 0x1a090
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f7f3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq 0x3078e(%rip), %rsi     # 0x5ff88
leaq 0x50(%rsp), %rdi
callq 0xb220
leaq 0xc0(%rsp), %rdi
callq 0xb120
movq %r12, %rax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r12), %rdi
cmpq %rbx, %rdi
je 0x2f84d
movq (%rbx), %rsi
incq %rsi
callq 0xb4a0
jmp 0x2f84d
jmp 0x2f841
movq %rax, %r14
jmp 0x2f868
jmp 0x2f84a
jmp 0x2f84a
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2f868
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq 0x30719(%rip), %rsi     # 0x5ff88
leaq 0x50(%rsp), %rdi
callq 0xb220
leaq 0xc0(%rsp), %rdi
callq 0xb120
movq %r14, %rdi
callq 0xb820
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/tests/catch.hpp
// Function: Catch::CompactReporter::AssertionPrinter::printReconstructedExpression() const
void printReconstructedExpression() const {
                if( result.hasExpandedExpression() ) {
                    {
                        Colour colour( dimColour() );
                        stream << " for: ";
                    }
                    stream << result.getExpandedExpression();
                }
            }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0xe822
testb %al, %al
je 0x30c15
movb $0x0, (%rsp)
movl $0x17, %edi
callq 0xe19c
movq (%rbx), %rdi
leaq 0x150c2(%rip), %rsi     # 0x45c7b
movl $0x6, %edx
callq 0xb530
xorl %edi, %edi
callq 0xe19c
movq (%rbx), %r14
movq 0x10(%rbx), %rax
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x70(%rax), %rsi
movq 0x78(%rax), %rdx
addq %rsi, %rdx
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x319ec
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb530
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x30c15
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb4a0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x30c4d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb4a0
jmp 0x30c4d
movq %rax, %rdi
callq 0x14d37
movq %rax, %rbx
movq %rsp, %rdi
callq 0xe206
movq %rbx, %rdi
callq 0xb820
nop
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/tests/catch.hpp
// Function: Catch::CompactReporter::AssertionPrinter::printExpressionWas()
void printExpressionWas() {
                if( result.hasExpression() ) {
                    stream << ";";
                    {
                        Colour colour( dimColour() );
                        stream << " expression was:";
                    }
                    printOriginalExpression();
                }
            }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x10(%rdi), %rax
cmpq $0x0, 0x50(%rax)
je 0x30f26
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0x14904(%rip), %rsi     # 0x457e9
movl $0x1, %edx
callq 0xb530
movb $0x0, 0xf(%rsp)
movl $0x17, %edi
callq 0xe19c
movq (%rbx), %rdi
leaq 0x14d86(%rip), %rsi     # 0x45c8e
movl $0x10, %edx
callq 0xb530
xorl %edi, %edi
callq 0xe19c
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x30af2
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rdi
callq 0x14d37
movq %rax, %rbx
leaq 0xf(%rsp), %rdi
callq 0xe206
movq %rbx, %rdi
callq 0xb820
nop
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/tests/catch.hpp
// Function: Catch::StreamBufImpl<Catch::OutputDebugWriter, 256ul>::overflow(int)
int overflow( int c ) {
            sync();

            if( c != EOF ) {
                if( pbase() == epptr() )
                    m_writer( std::string( 1, static_cast<char>( c ) ) );
                else
                    sputc( static_cast<char>( c ) );
            }
            return 0;
        }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rax
callq *0x30(%rax)
cmpl $-0x1, %ebx
je 0x325b8
movq 0x30(%r14), %rax
cmpq %rax, 0x20(%r14)
je 0x32570
movq 0x28(%r14), %rcx
cmpq %rax, %rcx
jae 0x325c2
movb %bl, (%rcx)
incq 0x28(%r14)
jmp 0x325b8
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movsbl %bl, %edx
leaq 0x8(%rsp), %rbx
movl $0x1, %esi
movq %rbx, %rdi
callq 0xb550
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x2da0c(%rip), %rdi     # 0x5ffa8
callq 0xb530
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x325b8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb4a0
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movzbl %bl, %esi
movq (%r14), %rax
movq %r14, %rdi
callq *0x68(%rax)
jmp 0x325b8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x325ea
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq %rbx, %rdi
callq 0xb820
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue_factory.h
// Function: gdc::circular_queue_factory<char, gdc::circular_queue<char>>::circular_queue_factory(unsigned long, bool, std::function<int (gdc::circular_queue<char>&)>)
circular_queue_factory(
			size_type capacity,
			bool sync = true,
			mdinit_type metadata_initializer = [](Q&) -> int { return 0; }) :
			_capacity(capacity),
			_sync(sync),
			_metadata_initializer(metadata_initializer),
			_q(nullptr, null_queue_destroyer)
		{
			assert(capacity >= 0);
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, 0x20(%rdi)
movb %dl, 0x28(%rdi)
addq $0x30, %rdi
movq %rcx, %rsi
callq 0x38b3e
leaq 0x2d5(%rip), %rax       # 0x38b9c
movq %rax, 0x50(%rbx)
movq $0x0, 0x58(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x388ef
movq (%r15), %rsi
incq %rsi
callq 0xb4a0
movq %r14, %rdi
callq 0xb820
nop
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/tests/catch.hpp
// Function: Catch::ExpressionLhs<gdc::circular_queue_factory<char, gdc::circular_queue<char>> const&>::endExpression()
void endExpression() {
        bool value = m_lhs ? true : false;
        m_rb
            .setLhs( Catch::toString( value ) )
            .setResultType( value )
            .endExpression();
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq (%rdi), %rbx
movq 0x8(%rdi), %rax
movq 0x58(%rax), %r15
xorl %esi, %esi
testq %r15, %r15
setne %sil
movq %rsp, %r14
movq %r14, %rdi
callq 0x1103a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11632
xorl %esi, %esi
testq %r15, %r15
setne %sil
movq %rax, %rdi
callq 0x1161c
movq %rax, %rdi
callq 0x11674
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38a9b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb4a0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x38ac3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq %rbx, %rdi
callq 0xb820
nop
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue_factory.h
// Function: gdc::circular_queue_factory<char, gdc::circular_queue<char>>::create_shared(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, bool, std::function<int (gdc::circular_queue<char>&)>)
static void create_shared(
			const std::string& name,
			size_type capacity,
			bool sync,
			mdinit_type metadata_initializer)
		{
			void* mdinit_context = &metadata_initializer;
			int status = ::gdc_circular_queue_create_shared(
				name.c_str(),
				capacity,
				sync,
				default_metadata_init,
				mdinit_context);

			if (status != 0)
			{
				std::string what("Failed to create shared memory queue: ");
				what.append(::strerror(errno));
				throw circular_queue_error(what);
			}
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r8
movq (%rdi), %rdi
leaq 0x3ec(%rip), %rcx       # 0x39108
callq 0x43824
testl %eax, %eax
jne 0x38d2f
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xe046(%rip), %rsi      # 0x46d85
leaq 0xe065(%rip), %rdx      # 0x46dab
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x31a82
callq 0xb050
movl (%rax), %edi
callq 0xb130
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb8b0
movl $0x18, %edi
callq 0xb1f0
movq %rax, %r14
leaq 0x8(%rax), %rdi
movq %rsp, %rsi
callq 0xb5b0
leaq 0x26d28(%rip), %rax     # 0x5fab0
movq %rax, (%r14)
leaq 0x26d4e(%rip), %rax     # 0x5fae0
movq %rax, 0x8(%r14)
leaq 0x26cd3(%rip), %rsi     # 0x5fa70
leaq -0x37a(%rip), %rdx      # 0x38a2a
movq %r14, %rdi
callq 0xb7d0
movq %rax, %rbx
movq %r14, %rdi
callq 0xb360
jmp 0x38dbc
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x38dd2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq %rbx, %rdi
callq 0xb820
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue_factory.h
// Function: gdc::circular_queue_factory<char, gdc::circular_queue<char>>::unmap_shared(gdc::circular_queue<char>*)
static void unmap_shared(Q* q)
		{
			auto qq = reinterpret_cast<gdc_circular_queue*>(q);
			int status = ::gdc_circular_queue_unmap_shared(qq);
			
			if (status != 0)
			{
				std::string what("Failed to unmap shared memory queue: ");
				what.append(::strerror(errno));
				throw circular_queue_error(what);
			}
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
callq 0x43bbb
testl %eax, %eax
jne 0x38ec2
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xdefe(%rip), %rsi      # 0x46dd0
leaq 0xdf1c(%rip), %rdx      # 0x46df5
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x31a82
callq 0xb050
movl (%rax), %edi
callq 0xb130
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb8b0
movl $0x18, %edi
callq 0xb1f0
movq %rax, %r14
leaq 0x8(%rax), %rdi
movq %rsp, %rsi
callq 0xb5b0
leaq 0x26b95(%rip), %rax     # 0x5fab0
movq %rax, (%r14)
leaq 0x26bbb(%rip), %rax     # 0x5fae0
movq %rax, 0x8(%r14)
leaq 0x26b40(%rip), %rsi     # 0x5fa70
leaq -0x50d(%rip), %rdx      # 0x38a2a
movq %r14, %rdi
callq 0xb7d0
movq %rax, %rbx
movq %r14, %rdi
callq 0xb360
jmp 0x38f4f
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x38f65
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq %rbx, %rdi
callq 0xb820
nop
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue_factory.h
// Function: gdc::circular_queue_factory<char, gdc::circular_queue<char>>::create_private(unsigned long, bool, std::function<int (gdc::circular_queue<char>&)>)
static Q* create_private(
			size_type capacity,
			bool sync,
			mdinit_type metadata_initializer)
		{
			void* mdinit_context = &metadata_initializer;
			gdc_circular_queue* q = ::gdc_circular_queue_create_private(
				capacity,
				sync,
				default_metadata_init,
				mdinit_context);

			if (q == NULL)
			{
				std::string what("Failed to create private queue: ");
				what.append(::strerror(errno));
				throw circular_queue_error(what);
			}
			
			return reinterpret_cast<Q*>(q);
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rcx
leaq 0x187(%rip), %rdx       # 0x39108
callq 0x43997
testq %rax, %rax
je 0x38f95
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xde51(%rip), %rsi      # 0x46df6
leaq 0xde6a(%rip), %rdx      # 0x46e16
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x31a82
callq 0xb050
movl (%rax), %edi
callq 0xb130
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb8b0
movl $0x18, %edi
callq 0xb1f0
movq %rax, %r14
leaq 0x8(%rax), %rdi
movq %rsp, %rsi
callq 0xb5b0
leaq 0x26ac2(%rip), %rax     # 0x5fab0
movq %rax, (%r14)
leaq 0x26ae8(%rip), %rax     # 0x5fae0
movq %rax, 0x8(%r14)
leaq 0x26a6d(%rip), %rsi     # 0x5fa70
leaq -0x5e0(%rip), %rdx      # 0x38a2a
movq %r14, %rdi
callq 0xb7d0
movq %rax, %rbx
movq %r14, %rdi
callq 0xb360
jmp 0x39022
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x39038
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq %rbx, %rdi
callq 0xb820
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue_factory.h
// Function: gdc::circular_queue_factory<char, gdc::circular_queue<char>>::delete_private(gdc::circular_queue<char>*)
static void delete_private(Q* q)
		{
			auto qq = reinterpret_cast<gdc_circular_queue*>(q);
			int status = ::gdc_circular_queue_delete_private(qq);
			
			if (status != 0)
			{
				std::string what("Failed to delete private queue: ");
				what.append(::strerror(errno));
				throw circular_queue_error(what);
			}
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
callq 0x43bb6
testl %eax, %eax
jne 0x3905c
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xddab(%rip), %rsi      # 0x46e17
leaq 0xddc4(%rip), %rdx      # 0x46e37
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x31a82
callq 0xb050
movl (%rax), %edi
callq 0xb130
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb8b0
movl $0x18, %edi
callq 0xb1f0
movq %rax, %r14
leaq 0x8(%rax), %rdi
movq %rsp, %rsi
callq 0xb5b0
leaq 0x269fb(%rip), %rax     # 0x5fab0
movq %rax, (%r14)
leaq 0x26a21(%rip), %rax     # 0x5fae0
movq %rax, 0x8(%r14)
leaq 0x269a6(%rip), %rsi     # 0x5fa70
leaq -0x6a7(%rip), %rdx      # 0x38a2a
movq %r14, %rdi
callq 0xb7d0
movq %rax, %rbx
movq %r14, %rdi
callq 0xb360
jmp 0x390e9
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x390ff
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq %rbx, %rdi
callq 0xb820
nop
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue_factory.h
// Function: gdc::circular_queue_factory<char, gdc::circular_queue<char>>::default_metadata_init(gdc_circular_queue*, void*)
static int default_metadata_init(gdc_circular_queue* q, void* context)
		{
			if (context != NULL)
			{
				auto init = reinterpret_cast<mdinit_type*>(context);
				auto qq = reinterpret_cast<Q*>(q);
				return (*init)(*qq);
			}
			
			return 0;
		}

// Assembly:
testq %rsi, %rsi
je 0x39123
cmpq $0x0, 0x10(%rsi)
je 0x39126
movq %rdi, %rax
movq 0x18(%rsi), %rcx
movq %rsi, %rdi
movq %rax, %rsi
jmpq *%rcx
xorl %eax, %eax
retq
pushq %rax
callq 0xb160
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/tests/catch.hpp
// Function: Catch::ResultBuilder& Catch::ExpressionLhs<int const&>::captureExpression<(Catch::Internal::Operator)0, int>(int const&)
ResultBuilder& captureExpression( RhsT const& rhs ) {
        return m_rb
            .setResultType( Internal::compare<Op>( m_lhs, rhs ) )
            .setLhs( Catch::toString( m_lhs ) )
            .setRhs( Catch::toString( rhs ) )
            .setOp( Internal::OperatorTraits<Op>::getName() );
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x8(%r14), %rax
movl (%rax), %eax
xorl %esi, %esi
cmpl (%rbx), %eax
sete %sil
callq 0x1161c
movq %rax, %r15
movq 0x8(%r14), %rax
movl (%rax), %esi
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x10dad
movq %r15, %rdi
movq %r14, %rsi
callq 0x11632
movq %rax, %r14
movl (%rbx), %esi
leaq 0x20(%rsp), %rdi
callq 0x10dad
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x11648
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xdc97(%rip), %rsi      # 0x46e38
leaq 0xdc92(%rip), %rdx      # 0x46e3a
movq %rsp, %rdi
callq 0x31a82
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x1165e
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x391d4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb4a0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x391ef
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb4a0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3920a
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x39237
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb4a0
jmp 0x39237
jmp 0x39234
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39259
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb4a0
jmp 0x39259
jmp 0x39256
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39274
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb4a0
movq %rbx, %rdi
callq 0xb820
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue.h
// Function: gdc::circular_queue<char>::push(char const*, unsigned long)
bool push(const_pointer data, size_type len)
		{
			auto p = alloc(len);
			
			if (p == nullptr)
			{
				return false;
			}
			
			std::memmove(p, data, len);
			commit(len);
			return true;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq %rdx, %rsi
callq 0x436a5
movq %rax, %r15
testq %rax, %rax
je 0x392d2
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0xb740
movq %r14, %rdi
movq %rbx, %rsi
callq 0x43778
testq %r15, %r15
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue.c
// Function: gdc_circular_queue_data
void*
gdc_circular_queue_data(gdc_circular_queue *q)
{
	static long page_size = -1;
	
	if (page_size == -1)
	{
		page_size = sysconf(_SC_PAGESIZE);
	}
	
	char *p = (char*)q + page_size;
	return p;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x1d040(%rip), %rax     # 0x60560
cmpq $-0x1, %rax
jne 0x43537
movl $0x1e, %edi
callq 0xb2c0
movq %rax, 0x1d029(%rip)     # 0x60560
addq %rax, %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue.c
// Function: gdc_circular_queue_peek
void*
gdc_circular_queue_peek(gdc_circular_queue *q)
{
	size_t rp = atomic_load_explicit(&q->rpos, memory_order_relaxed);
	size_t wp = atomic_load_explicit(&q->wpos, memory_order_relaxed);
	
	if (rp == wp)
	{
		// Queue is empty.
		return NULL;
	}
	
	if (q->properties.sync)
	{
		// Memory fence after relaxed read of wpos.
		atomic_thread_fence(memory_order_acquire);
	}
	
	char *d = gdc_circular_queue_data(q);
	char *p = &d[rp];
	return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
movq 0x40(%rdi), %rax
cmpq %rax, %r14
jne 0x435f3
xorl %ebx, %ebx
jmp 0x43623
movq %rdi, %rbx
cmpl $0x0, 0x88(%rdi)
je 0x435ff
movq 0x1cf5a(%rip), %rax     # 0x60560
cmpq $-0x1, %rax
jne 0x4361d
movl $0x1e, %edi
callq 0xb2c0
movq %rax, 0x1cf43(%rip)     # 0x60560
addq %rax, %rbx
addq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue.c
// Function: gdc_circular_queue_alloc
void*
gdc_circular_queue_alloc(gdc_circular_queue *q, size_t len)
{
	assert(len > 0);
	assert(len < gdc_circular_queue_capacity(q));
	
	size_t rp = atomic_load_explicit(&q->rpos, memory_order_relaxed);
	size_t wp = atomic_load_explicit(&q->wpos, memory_order_relaxed);
	
	if (len > space(q, rp, wp))
	{
		return NULL;
	}
	
	char* d = gdc_circular_queue_data(q);
	char* p = &d[wp];
	return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x4371b
movq %rdi, %rbx
movq 0x80(%rdi), %rax
cmpq %rsi, %rax
jbe 0x4373a
movq (%rbx), %rax
movq 0x40(%rbx), %r14
movq 0x80(%rbx), %rcx
movq %r14, %rdx
notq %rdx
addq %rax, %rdx
addq %rcx, %rdx
subq %r14, %rax
cmovbeq %rdx, %rax
cmpq %rcx, %rax
jae 0x43759
cmpq %rsi, %rax
jae 0x436ec
xorl %ebx, %ebx
jmp 0x43710
movq 0x1ce6d(%rip), %rax     # 0x60560
cmpq $-0x1, %rax
jne 0x4370a
movl $0x1e, %edi
callq 0xb2c0
movq %rax, 0x1ce56(%rip)     # 0x60560
addq %rax, %rbx
addq %r14, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x45d6(%rip), %rdi      # 0x47cf8
leaq 0x457c(%rip), %rsi      # 0x47ca5
leaq 0x45d0(%rip), %rcx      # 0x47d00
movl $0xce, %edx
callq 0xb2d0
leaq 0x45fc(%rip), %rdi      # 0x47d3d
leaq 0x455d(%rip), %rsi      # 0x47ca5
leaq 0x45b1(%rip), %rcx      # 0x47d00
movl $0xcf, %edx
callq 0xb2d0
leaq 0x4662(%rip), %rdi      # 0x47dc2
leaq 0x453e(%rip), %rsi      # 0x47ca5
leaq 0x4698(%rip), %rcx      # 0x47e06
movl $0x12a, %edx            # imm = 0x12A
callq 0xb2d0
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue.c
// Function: gdc_circular_queue_commit
void
gdc_circular_queue_commit(gdc_circular_queue *q, size_t len)
{
	assert(len > 0);
	assert(len < gdc_circular_queue_capacity(q));
	assert(len <= gdc_circular_queue_space(q));
	advance_wpos(q, len);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x437c6
movq %rsi, %r14
movq %rdi, %rbx
movq 0x80(%rdi), %rax
cmpq %rsi, %rax
jbe 0x437e5
movq %rbx, %rdi
callq 0x43598
cmpq %r14, %rax
jb 0x43804
movq 0x40(%rbx), %rax
addq %r14, %rax
movq 0x80(%rbx), %rcx
xorl %edx, %edx
divq %rcx
cmpl $0x0, 0x88(%rbx)
movq %rdx, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x452b(%rip), %rdi      # 0x47cf8
leaq 0x44d1(%rip), %rsi      # 0x47ca5
leaq 0x4587(%rip), %rcx      # 0x47d62
movl $0xe2, %edx
callq 0xb2d0
leaq 0x4551(%rip), %rdi      # 0x47d3d
leaq 0x44b2(%rip), %rsi      # 0x47ca5
leaq 0x4568(%rip), %rcx      # 0x47d62
movl $0xe3, %edx
callq 0xb2d0
leaq 0x4594(%rip), %rdi      # 0x47d9f
leaq 0x4493(%rip), %rsi      # 0x47ca5
leaq 0x4549(%rip), %rcx      # 0x47d62
movl $0xe4, %edx
callq 0xb2d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue_factory.c
// Function: gdc_circular_queue_create_shared
int
gdc_circular_queue_create_shared(
	const char* name,
	size_t capacity,
	int sync,
	int (*mdinit)(gdc_circular_queue*, void*),
	void* md_context)
{
	// Unlink any old shared memory object with the same name.
	int status = shm_unlink(name);
	if (status == -1 && errno != ENOENT)
	{
		return -1;
	}
	
	// Create a new shared memory object.
	int fd = shm_open(name, O_RDWR | O_CREAT | O_EXCL, S_IRWXU);
	if (fd == -1)
	{
		shm_unlink(name);
		return -1;
	}
	
	size_t len = gdc_circular_queue_footprint(capacity) + capacity;
	status = ftruncate(fd, len);
	if (status != 0)
	{
		close(fd);
		shm_unlink(name);
		return -1;
	}
	
	void *p = mmap(
		NULL,
		len,
		PROT_READ | PROT_WRITE,
		MAP_SHARED,
		fd,
		0);
	if (p == MAP_FAILED)
	{
		shm_unlink(name);
		close(fd);
		return -1;
	}
	
	gdc_circular_queue* q = p;
	status = gdc_circular_queue_init(q, capacity, sync, mdinit, md_context);
	
	if (status == -1)
	{
		shm_unlink(name);
		close(fd);
		return status;
	}
	
	if (munmap(p, len) != 0)
	{
		shm_unlink(name);
		close(fd);
		return -1;
	}
	
	if (close(fd) != 0)
	{
		shm_unlink(name);
		return -1;
	}
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r15
movq %rcx, %r14
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %rbx
callq 0xb890
cmpl $-0x1, %eax
jne 0x43861
callq 0xb050
movq %rax, %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x2, (%rcx)
jne 0x43914
movq %rbx, %rdi
movl $0xc2, %esi
movl $0x1c0, %edx            # imm = 0x1C0
callq 0xb780
cmpl $-0x1, %eax
je 0x438a2
movl %eax, %ebp
movq %r14, 0x10(%rsp)
movq %r13, %rdi
callq 0x43936
movq %rax, %r14
addq %r13, %r14
movl %ebp, %edi
movq %r14, %rsi
callq 0xb600
testl %eax, %eax
je 0x438ac
movl %ebp, %edi
callq 0xb8e0
movq %rbx, %rdi
callq 0xb890
jmp 0x4390f
movq %r15, 0x8(%rsp)
xorl %edi, %edi
movq %r14, %rsi
movl $0x3, %edx
movl $0x1, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0xb830
cmpq $-0x1, %rax
je 0x43900
movq %rax, %r15
movq %rax, %rdi
movq %r13, %rsi
movl %r12d, %edx
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %r8
callq 0x434d4
cmpl $-0x1, %eax
je 0x43900
movq %r15, %rdi
movq %r14, %rsi
callq 0xb250
testl %eax, %eax
je 0x43923
movq %rbx, %rdi
callq 0xb890
movl %ebp, %edi
callq 0xb8e0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %edi
callq 0xb8e0
testl %eax, %eax
jne 0x438a2
xorl %eax, %eax
jmp 0x43914
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue_factory.c
// Function: gdc_circular_queue_footprint
static size_t
gdc_circular_queue_footprint(size_t capacity)
{
	long page_size = sysconf(_SC_PAGESIZE);
	if (page_size == -1)
	{
		return 0;
	}
	assert(page_size > 0);
	
	if (capacity == 0)
	{
		return page_size;
	}
	
	// Calculate the smallest multiple of page size that is >= page size + capacity.
	// The first page is for struct gdc_circular_queue. The other pages are for data.
	// Examples:
	// capacity == 0 => footprint = page_size.
	// capacity == 1 => footprint = page_size.
	// capacity == page_size => footprint = page_size.
	// capacity == page_size + 1 => footprint = 2 * page_size.
	long footprint = page_size + (((capacity - 1) / page_size) + 1) * page_size;
	return footprint;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1e, %edi
callq 0xb2c0
cmpq $-0x1, %rax
je 0x4396c
movq %rax, %rcx
testq %rax, %rax
jle 0x43973
testq %rbx, %rbx
je 0x4396e
decq %rbx
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
addq $0x2, %rax
imulq %rax, %rcx
jmp 0x4396e
xorl %ecx, %ecx
movq %rcx, %rax
popq %rbx
retq
leaq 0x450e(%rip), %rdi      # 0x47e88
leaq 0x4515(%rip), %rsi      # 0x47e96
leaq 0x456f(%rip), %rcx      # 0x47ef7
movl $0x30, %edx
callq 0xb2d0
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue_factory.c
// Function: gdc_circular_queue_create_private
gdc_circular_queue*
gdc_circular_queue_create_private(
	size_t capacity,
	int sync,
	int (*mdinit)(gdc_circular_queue*, void*),
	void* md_context)
{
	static atomic_int seq;
	int unique = atomic_fetch_add_explicit(&seq, 1, memory_order_relaxed);
	pid_t pid = getpid();
	char tmp_name[32];
	sprintf(tmp_name, "/.gdc.%d.%d", pid, unique);
	
	if (gdc_circular_queue_create_shared(tmp_name, capacity, sync, mdinit, md_context) == -1)
	{
		return NULL;
	}
	
	gdc_circular_queue *q = gdc_circular_queue_map_shared(tmp_name);
	gdc_circular_queue_delete_shared(tmp_name);
	return q;
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r12
movl $0x1, %r13d
lock
xaddl %r13d, 0x1cdeb(%rip)    # 0x607ac
callq 0xb670
leaq 0x44af(%rip), %rsi      # 0x47e7c
xorl %ebx, %ebx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %eax, %edx
movl %r13d, %ecx
xorl %eax, %eax
callq 0xb0a0
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r15, %rcx
movq 0x8(%rsp), %r8
callq 0x43824
cmpl $-0x1, %eax
je 0x43a15
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x43a27
movq %rax, %rbx
movq %r14, %rdi
callq 0xb890
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/dadocolussi[P]gdc-circular_queue/src/gdc_circular_queue_factory.c
// Function: gdc_circular_queue_unmap_shared
int
gdc_circular_queue_unmap_shared(gdc_circular_queue *q)
{
	if (q != NULL)
	{
		size_t capacity = gdc_circular_queue_capacity(q);
		size_t footprint = gdc_circular_queue_footprint(capacity);
		return munmap(q, footprint + capacity);
	}
	
	return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x43bec
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4353f
movq %rax, %r14
movq %rax, %rdi
callq 0x43936
addq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb250
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/msutil.c
// Function: vec_free
void
vec_free(VEC* v)
{
    if (!v) return;
    vec_resize(v, 0);
    free(v->ptr);
    free(v);
}

// Assembly:
testq %rdi, %rdi
je 0x5ad2
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x5ad3
movq 0x8(%rbx), %rdi
callq 0x3250
movq %rbx, %rdi
popq %rbx
jmp 0x3250
retq
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/msutil.c
// Function: vec_resize
void
vec_resize(VEC* v, int limit)
{
    if (v->dtor)
        while (v->count > limit)
            v->dtor(vec_pop(v), v->context);

    v->ptr = realloc(v->ptr, v->width * (v->limit = limit));
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
jne 0x5b09
jmp 0x5b10
testl %eax, %eax
je 0x5afe
cltq
decq %rax
movl %eax, 0x4(%rbx)
movslq 0x10(%rbx), %rdi
imulq %rax, %rdi
addq 0x8(%rbx), %rdi
jmp 0x5b00
xorl %edi, %edi
movq 0x20(%rbx), %rsi
xorl %eax, %eax
callq *0x18(%rbx)
movl 0x4(%rbx), %eax
cmpl %ebp, %eax
jg 0x5ae4
movq 0x8(%rbx), %rdi
movslq 0x10(%rbx), %rax
movl %ebp, (%rbx)
movslq %ebp, %rsi
imulq %rax, %rsi
callq 0x3340
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/msutil.c
// Function: STRcat
STR
STRcat(STR str, char const *s)
{
    int     size = vec_count(str);
    vec_allow(str, size + strlen(s) + 1);
    strcpy(STRptr(str) + size, s);
    return  str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
je 0x5beb
movl 0x4(%rbx), %r15d
jmp 0x5bee
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x30d0
leal (%r15,%rax), %ecx
incl %ecx
movq 0x8(%rbx), %rax
cmpl %ecx, (%rbx)
jge 0x5c1d
movslq 0x10(%rbx), %rdx
movl %ecx, (%rbx)
movslq %ecx, %rsi
imulq %rdx, %rsi
movq %rax, %rdi
callq 0x3340
movq %rax, 0x8(%rbx)
movslq %r15d, %rdi
addq %rax, %rdi
movq %r14, %rsi
callq 0x31b0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/msutil.c
// Function: addr_part
MEMREF
addr_part(MEMREF r)
{
    const char  *dp, *cp = memchr(r.ptr, '(', r.len);
    size_t        len = cp ? (size_t)(cp - r.ptr) : r.len;

    if ((cp = memchr(r.ptr, '<', len)) && (dp = memchr(cp, '>', r.ptr+len-cp))) {
        len = dp - cp - 1;
        ++cp;
    } else {
        cp = r.ptr;
    }
        // Trim leading space
    while (len > 0 && isspace(cp[len-1])) --len;
    while (len > 0 && isspace(*cp)) ++cp, --len;
        // (cp) should match /.[@%]./
    return    memref(cp, len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movl $0x28, %esi
movq %r15, %rdx
callq 0x3210
movq %rax, %r14
subq %rbx, %r14
testq %rax, %rax
cmoveq %r15, %r14
movq %rbx, %rdi
movl $0x3c, %esi
movq %r14, %rdx
callq 0x3210
testq %rax, %rax
je 0x5cd0
movq %rax, %r15
leaq (%rbx,%r14), %rdx
subq %rax, %rdx
movq %rax, %rdi
movl $0x3e, %esi
callq 0x3210
testq %rax, %rax
je 0x5cd0
movq %r15, %rcx
notq %rcx
addq %rcx, %rax
incq %r15
movq %r15, %rbx
movq %rax, %r14
incq %r14
cmpq $0x1, %r14
je 0x5d0c
callq 0x31f0
movq (%rax), %rax
movsbq -0x2(%rbx,%r14), %rcx
decq %r14
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x5cd3
callq 0x31f0
movq (%rax), %rax
movsbq (%rbx), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x5d0f
incq %rbx
decq %r14
jne 0x5cf9
xorl %r14d, %r14d
xorl %eax, %eax
testl %r14d, %r14d
cmovneq %rbx, %rax
testq %rbx, %rbx
movslq %r14d, %rdx
cmoveq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/msutil.c
// Function: belch
int
belch(char const *filename, MEMREF data)
{
    FILE    *fp = fopen(filename, "w");
    if (!fp) return 0;
    int ret = fwrite(data.ptr, data.len, 1, fp);
    fclose(fp);
    return  ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x26be(%rip), %rsi      # 0x83f8
callq 0x3230
testq %rax, %rax
je 0x5d67
movq %rax, %r15
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x33c0
movq %rax, %rbx
movq %r15, %rdi
callq 0x31c0
jmp 0x5d69
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/msutil.c
// Function: cmpxm
int
cmpxm(void const*_src, void const*_dst, int len)
{
    uint8_t const *src = (uint8_t const*)_src;
    uint8_t const *dst = (uint8_t const*)_dst;
    int ret, srcoff = 15 & (intptr_t)src;

    if (srcoff && len > 31) {
        if ((ret = xm_diff(xm_loud(src), xm_loud(dst))))
            return cmp(ret, src, dst);

        src += 16 - srcoff;
        dst += 16 - srcoff;
        len -= 16 - srcoff;
    }

    // A special case for srcoff==dstoff => xm_load(dst)
    // seems to make no difference.
    // Prefetch windows from 128..512 all do about the same.
#   define PRE (512-64)
    for (; len >= 16; src += 16, dst += 16, len -=16) {
        _mm_prefetch(src+PRE, _MM_HINT_NTA);
        _mm_prefetch(dst+PRE, _MM_HINT_NTA);
        if ((ret = xm_diff(xm_load(src), xm_loud(dst))))
            return cmp(ret, src, dst);
    }

    // xm_loud(dst) can actually go beyond valid mem :-(
    ret = xm_diff(xm_loud(src), xm_loud(dst)) & ~(-1 << len);
    return ret ? cmp(ret,  src, dst) : 0;
}

// Assembly:
movl %edi, %eax
andl $0xf, %eax
sete %cl
cmpl $0x20, %edx
setl %r8b
orb %cl, %r8b
jne 0x5e01
movdqu (%rdi), %xmm0
movdqu (%rsi), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %ecx
cmpl $0xffff, %ecx           # imm = 0xFFFF
je 0x5e08
notl %ecx
bsfl %ecx, %eax
jmp 0x5e80
cmpl $0x10, %edx
jge 0x5e17
jmp 0x5e58
movl $0x10, %ecx
subl %eax, %ecx
addq %rcx, %rdi
addq %rcx, %rsi
subl %ecx, %edx
leal 0x10(%rdx), %ecx
xorl %eax, %eax
prefetchnta 0x1c0(%rdi,%rax)
prefetchnta 0x1c0(%rsi,%rax)
movdqu (%rsi,%rax), %xmm0
pcmpeqb (%rdi,%rax), %xmm0
pmovmskb %xmm0, %r8d
cmpl $0xffff, %r8d           # imm = 0xFFFF
jne 0x5e88
addq $0x10, %rax
addl $-0x10, %ecx
cmpl $0x1f, %ecx
jg 0x5e1c
addq %rax, %rsi
addq %rax, %rdi
subl %eax, %edx
movdqu (%rdi), %xmm0
movdqu (%rsi), %xmm1
pcmpeqb %xmm0, %xmm1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %edx, %ecx
shll %cl, %eax
pmovmskb %xmm1, %ecx
xorl $0xffff, %ecx           # imm = 0xFFFF
notl %eax
andl %ecx, %eax
je 0x5ea4
bsfl %eax, %eax
addq %rax, %rdi
addq %rax, %rsi
jmp 0x5e9b
notl %r8d
bsfl %r8d, %ecx
addq %rax, %rdi
addq %rcx, %rdi
addq %rax, %rsi
addq %rcx, %rsi
movzbl (%rdi), %eax
movzbl (%rsi), %ecx
subl %ecx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/msutil.c
// Function: memsame
int memsame(void const*_src, void const*_dst, int len)
{
    uint8_t const *src = (uint8_t const*)_src;
    uint8_t const *dst = (uint8_t const*)_dst;
    int ret, srcoff = 15 & (intptr_t)src;

    if (srcoff && len > 31) {
        if ((ret = xm_diff(xm_loud(src), xm_loud(dst))))
            return src - (uint8_t const*)_src + ffs(ret) - 1;

        src += 16 - srcoff;
        dst += 16 - srcoff;
        len -= 16 - srcoff;
    }

    // A special case for srcoff==dstoff => xm_load(dst)
    //  seems to make no difference.
    // Prefetch windows from 128..512 all do about the same.
#   define PRE (512-64)
    for (; len >= 16; src += 16, dst += 16, len -=16) {
        _mm_prefetch(src+PRE, _MM_HINT_NTA);
        _mm_prefetch(dst+PRE, _MM_HINT_NTA);
        if ((ret = xm_diff(xm_load(src), xm_loud(dst))))
            return src - (uint8_t const*)_src + ffs(ret) - 1;
    }

    if ((ret = xm_diff(xm_loud(src), xm_loud(dst)) & ~(-1 << len)))
        return src - (uint8_t const*)_src + ffs(ret) - 1;
    return 0;
}

// Assembly:
movl %edi, %eax
andl $0xf, %eax
sete %cl
cmpl $0x20, %edx
setl %r8b
orb %cl, %r8b
jne 0x5ed9
movdqu (%rdi), %xmm0
movdqu (%rsi), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %ecx
cmpl $0xffff, %ecx           # imm = 0xFFFF
je 0x5ee3
notl %ecx
bsfl %ecx, %eax
retq
movq %rdi, %r8
cmpl $0x10, %edx
jge 0x5ef3
jmp 0x5f33
movl $0x10, %ecx
subl %eax, %ecx
leaq (%rdi,%rcx), %r8
addq %rcx, %rsi
subl %ecx, %edx
movl %edi, %ecx
subl %r8d, %ecx
movl %edx, %eax
prefetchnta 0x1c0(%r8)
prefetchnta 0x1c0(%rsi)
movdqu (%rsi), %xmm0
pcmpeqb (%r8), %xmm0
pmovmskb %xmm0, %edx
cmpl $0xffff, %edx           # imm = 0xFFFF
jne 0x5f63
addq $0x10, %r8
addq $0x10, %rsi
leal -0x10(%rax), %edx
addl $-0x10, %ecx
cmpl $0x1f, %eax
movl %edx, %eax
jg 0x5efa
movdqu (%r8), %xmm0
movdqu (%rsi), %xmm1
pcmpeqb %xmm0, %xmm1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %edx, %ecx
shll %cl, %eax
pmovmskb %xmm1, %ecx
xorl $0xffff, %ecx           # imm = 0xFFFF
notl %eax
andl %ecx, %eax
je 0x5f6b
subl %edi, %r8d
bsfl %eax, %eax
addl %r8d, %eax
retq
notl %edx
bsfl %edx, %eax
subl %ecx, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/msutil.c
// Function: fileref
MEMREF
fileref(char const *filename)
{
    MEMREF  mr = NILREF;
    int     fd = open(filename, O_RDONLY, 0);
    if (fd >= 0) {
        mr.len = lseek(fd, 0L, SEEK_END);
        mr.ptr = mmap(NULL, mr.len, PROT_READ, MAP_SHARED|MAP_NOCORE, fd, 0);
        close(fd);
    }

    return fd < 0 || mr.len <= 0 || mr.ptr == MAP_FAILED ? NILREF : mr;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x3150
movl %eax, %ebp
testl %eax, %eax
js 0x5fbc
movl %ebp, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x33a0
movq %rax, %r14
xorl %edi, %edi
movq %rax, %rsi
movl $0x1, %edx
movl $0x1, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x3380
movq %rax, %rbx
movl %ebp, %edi
callq 0x33d0
jmp 0x5fbf
xorl %r14d, %r14d
testl %ebp, %ebp
sets %al
testq %r14, %r14
sete %cl
cmpq $-0x1, %rbx
sete %dl
orb %cl, %dl
xorl %ecx, %ecx
orb %al, %dl
cmovneq %rcx, %rbx
cmovneq %rcx, %r14
movq %rbx, %rax
movq %r14, %rdx
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/msutil.c
// Function: findbit_0
int
findbit_0(uint8_t const*vec, int len)
{
    int off = 15 & (intptr_t)vec;
    uint8_t const *bp = vec - off;  // Back up to a 16b boundary.
    __m128i ones = {-1, -1};
    uint16_t m = BYTEDIFF(bp, ones);
    len += off;
        // Mask off trailing bits (tiny vec)
    if (len < 16) m &= ~(-1 << len);  
        // First time through, mask off leading (off) bits
    for (m &= -1 << off; !m && len >= 16; m = BYTEDIFF(bp, ones))
        bp += 16, len -= 16, _mm_prefetch(bp+512, _MM_HINT_NTA);
        // Mask off trailing bits (tail of vec)
    if (len < 16) m &= ~(-1 << len);  
    return m ? (off = bsrl(m), 8*(off+bp-vec) + bsrl(bp[off] ^ 0xFF)) : -1;
}

// Assembly:
pushq %rbp
pushq %rbx
movl %edi, %edx
andl $0xf, %edx
movq %rdi, %r8
andq $-0x10, %r8
pcmpeqd %xmm0, %xmm0
movdqa (%r8), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %ebx
notl %ebx
addl %edx, %esi
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
movl %esi, %ecx
shll %cl, %r11d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x10, %esi
setl %bpl
notl %r11d
movl $0xffff, %r9d           # imm = 0xFFFF
movl %r11d, %r10d
cmovgel %r9d, %r10d
movl %edx, %ecx
shrl %cl, %r10d
shll %cl, %r10d
andl %ebx, %r10d
testw %r10w, %r10w
setne %cl
orb %bpl, %cl
jne 0x608a
prefetchnta 0x210(%r8)
movdqa 0x10(%r8), %xmm1
addq $0x10, %r8
leal -0x10(%rsi), %ecx
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %r10d
cmpl $0xffff, %r10d          # imm = 0xFFFF
jne 0x6079
cmpl $0x1f, %esi
movl %ecx, %esi
ja 0x604b
notl %r10d
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
shll %cl, %r11d
notl %r11d
jmp 0x608c
movl %esi, %ecx
cmpl $0x10, %ecx
cmovll %r11d, %r9d
andw %r10w, %r9w
je 0x60b8
movzwl %r9w, %eax
bsrl %eax, %eax
cltq
leaq (%r8,%rax), %rcx
subl %edi, %ecx
movzbl (%r8,%rax), %eax
xorl $0xff, %eax
bsrl %eax, %eax
leal (%rax,%rcx,8), %eax
popq %rbx
popq %rbp
retq