// File: tokuhirom[P]nanouri/t/04_unescape.cc
// Function: main
int main() {
    is_binary(nanouri::unescape_uri(std::string("hello%01%02")), std::string("hello\x01\x02"), "escape");
    is(nanouri::unescape_uri(std::string("hello%01%02")), std::string("hello\x01\x02"), "escape");

    is_binary(nanouri::unescape_uri(std::string("hi%ff")), std::string("hi\xff"), "escape");

    done_testing();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
leaq -0x41(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x22d0
movq -0x168(%rbp), %rdx
leaq 0x10af(%rip), %rsi      # 0x4058
leaq -0x40(%rbp), %rdi
callq 0x3330
jmp 0x2fb4
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x25b0
jmp 0x2fc3
leaq -0x79(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x22d0
movq -0x170(%rbp), %rdx
leaq 0x1083(%rip), %rsi      # 0x4064
leaq -0x78(%rbp), %rdi
callq 0x3330
jmp 0x2fec
leaq 0x1079(%rip), %rdx      # 0x406c
leaq -0x20(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x2c40
jmp 0x3002
leaq -0x78(%rbp), %rdi
callq 0x20e0
leaq -0x79(%rbp), %rdi
callq 0x21e0
leaq -0x20(%rbp), %rdi
callq 0x20e0
leaq -0x40(%rbp), %rdi
callq 0x20e0
leaq -0x41(%rbp), %rdi
callq 0x21e0
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0x22d0
movq -0x178(%rbp), %rdx
leaq 0x1008(%rip), %rsi      # 0x4058
leaq -0xc0(%rbp), %rdi
callq 0x3330
jmp 0x305e
leaq -0xa0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x25b0
jmp 0x3073
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x22d0
movq -0x180(%rbp), %rdx
leaq 0xfd0(%rip), %rsi       # 0x4064
leaq -0xe8(%rbp), %rdi
callq 0x3330
jmp 0x30a2
leaq 0xfc3(%rip), %rdx       # 0x406c
leaq -0xa0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2a50
jmp 0x30be
leaq -0xe8(%rbp), %rdi
callq 0x20e0
leaq -0xe9(%rbp), %rdi
callq 0x21e0
leaq -0xa0(%rbp), %rdi
callq 0x20e0
leaq -0xc0(%rbp), %rdi
callq 0x20e0
leaq -0xc1(%rbp), %rdi
callq 0x21e0
leaq -0x131(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x22d0
movq -0x188(%rbp), %rdx
leaq 0xf58(%rip), %rsi       # 0x4073
leaq -0x130(%rbp), %rdi
callq 0x3330
jmp 0x3129
leaq -0x110(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x25b0
jmp 0x313e
leaq -0x159(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x22d0
movq -0x190(%rbp), %rdx
leaq 0xf1a(%rip), %rsi       # 0x4079
leaq -0x158(%rbp), %rdi
callq 0x3330
jmp 0x316d
leaq 0xef8(%rip), %rdx       # 0x406c
leaq -0x110(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x2c40
jmp 0x3189
leaq -0x158(%rbp), %rdi
callq 0x20e0
leaq -0x159(%rbp), %rdi
callq 0x21e0
leaq -0x110(%rbp), %rdi
callq 0x20e0
leaq -0x130(%rbp), %rdi
callq 0x20e0
leaq -0x131(%rbp), %rdi
callq 0x21e0
callq 0x2930
xorl %eax, %eax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x322f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3226
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3214
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x20e0
leaq -0x79(%rbp), %rdi
callq 0x21e0
leaq -0x20(%rbp), %rdi
callq 0x20e0
leaq -0x40(%rbp), %rdi
callq 0x20e0
leaq -0x41(%rbp), %rdi
callq 0x21e0
jmp 0x3323
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x32a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3297
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x327f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x20e0
leaq -0xe9(%rbp), %rdi
callq 0x21e0
leaq -0xa0(%rbp), %rdi
callq 0x20e0
leaq -0xc0(%rbp), %rdi
callq 0x20e0
leaq -0xc1(%rbp), %rdi
callq 0x21e0
jmp 0x3323
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x3317
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x330b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x32f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x20e0
leaq -0x159(%rbp), %rdi
callq 0x21e0
leaq -0x110(%rbp), %rdi
callq 0x20e0
leaq -0x130(%rbp), %rdi
callq 0x20e0
leaq -0x131(%rbp), %rdi
callq 0x21e0
movq -0x50(%rbp), %rdi
callq 0x22c0
nopl (%rax)