// File: tokuhirom[P]nanouri/t/nanotap.h
// Function: is_binary(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const*)
inline NANOTAP_DECLARE void is_binary(const std::string &got, const std::string& expected, const char *msg) {
    if (got.size() != expected.size()) {
        ok(0, msg);
        std::stringstream ss;
        ss << "Expected " << expected.size() << " bytes chars, but got " << got.size() << " bytes chars";
        diag(ss.str());
        return;
    }
    for (size_t i=0; i<got.size(); i++) {
        if (got[i] != expected[i]) {
            ok(0, msg);

            std::stringstream ss;
            ss << "Expected " << std::hex << int(expected[i]) << " but got " << int(got[i]) << ", at " << i;
            diag(ss.str());
            return;
        }
    }
    ok(true, msg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3f0, %rsp            # imm = 0x3F0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2120
movq %rax, -0x388(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2120
movq %rax, %rcx
movq -0x388(%rbp), %rax
cmpq %rcx, %rax
je 0x2daa
movq -0x18(%rbp), %rsi
xorl %edi, %edi
callq 0x27d0
leaq -0x1a0(%rbp), %rdi
callq 0x2130
leaq -0x190(%rbp), %rdi
leaq 0x135c(%rip), %rsi      # 0x4024
callq 0x21b0
movq %rax, -0x390(%rbp)
jmp 0x2cd6
movq -0x10(%rbp), %rdi
callq 0x2120
movq -0x390(%rbp), %rdi
movq %rax, %rsi
callq 0x2060
movq %rax, -0x398(%rbp)
jmp 0x2cf7
movq -0x398(%rbp), %rdi
leaq 0x1329(%rip), %rsi      # 0x402e
callq 0x21b0
movq %rax, -0x3a0(%rbp)
jmp 0x2d13
movq -0x8(%rbp), %rdi
callq 0x2120
movq -0x3a0(%rbp), %rdi
movq %rax, %rsi
callq 0x2060
movq %rax, -0x3a8(%rbp)
jmp 0x2d34
movq -0x3a8(%rbp), %rdi
leaq 0x1303(%rip), %rsi      # 0x4045
callq 0x21b0
jmp 0x2d49
leaq -0x1d0(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x21a0
jmp 0x2d5e
leaq -0x1d0(%rbp), %rdi
callq 0x2970
leaq -0x1d0(%rbp), %rdi
callq 0x20e0
leaq -0x1a0(%rbp), %rdi
callq 0x2150
jmp 0x2f8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x2150
jmp 0x2f93
movq $0x0, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rax
movq %rax, -0x3b0(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2120
movq %rax, %rcx
movq -0x3b0(%rbp), %rax
cmpq %rcx, %rax
jae 0x2f7c
movq -0x8(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
callq 0x2200
movsbl (%rax), %eax
movl %eax, -0x3b4(%rbp)
movq -0x10(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
callq 0x2200
movq %rax, %rcx
movl -0x3b4(%rbp), %eax
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x2f63
movq -0x18(%rbp), %rsi
xorl %edi, %edi
callq 0x27d0
leaq -0x360(%rbp), %rdi
callq 0x2130
leaq -0x350(%rbp), %rdi
leaq 0x11e3(%rip), %rsi      # 0x4024
callq 0x21b0
movq %rax, -0x3c0(%rbp)
jmp 0x2e4f
movq -0x3c0(%rbp), %rdi
leaq 0x563(%rip), %rsi       # 0x33c0
callq 0x2080
movq %rax, -0x3c8(%rbp)
jmp 0x2e6b
movq -0x10(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
callq 0x2200
movq -0x3c8(%rbp), %rdi
movsbl (%rax), %esi
callq 0x22d0
movq %rax, -0x3d0(%rbp)
jmp 0x2e93
movq -0x3d0(%rbp), %rdi
leaq 0x119a(%rip), %rsi      # 0x403b
callq 0x21b0
movq %rax, -0x3d8(%rbp)
jmp 0x2eaf
movq -0x8(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
callq 0x2200
movq -0x3d8(%rbp), %rdi
movsbl (%rax), %esi
callq 0x22d0
movq %rax, -0x3e0(%rbp)
jmp 0x2ed7
movq -0x3e0(%rbp), %rdi
leaq 0x116d(%rip), %rsi      # 0x4052
callq 0x21b0
movq %rax, -0x3e8(%rbp)
jmp 0x2ef3
movq -0x3e8(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
callq 0x2060
jmp 0x2f08
leaq -0x380(%rbp), %rdi
leaq -0x360(%rbp), %rsi
callq 0x21a0
jmp 0x2f1d
leaq -0x380(%rbp), %rdi
callq 0x2970
leaq -0x380(%rbp), %rdi
callq 0x20e0
leaq -0x360(%rbp), %rdi
callq 0x2150
jmp 0x2f8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
leaq -0x360(%rbp), %rdi
callq 0x2150
jmp 0x2f93
jmp 0x2f65
movq -0x1d8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1d8(%rbp)
jmp 0x2db5
movq -0x18(%rbp), %rsi
movl $0x1, %edi
callq 0x27d0
addq $0x3f0, %rsp            # imm = 0x3F0
popq %rbp
retq
movq -0x1a8(%rbp), %rdi
callq 0x22e0
nop