// File: /workspace/github_cpp_makefile_star2_O1/sile[P]unf/src/unf/unf-test.cc
// Function: nf_test(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, UNF::Normalizer&, int)
bool nf_test(const std::vector<std::string>& ary, UNF::Normalizer& norm, int entry_id) {
  static const UNF::Normalizer::Form forms[] = {UNF::Normalizer::FORM_NFD, UNF::Normalizer::FORM_NFC,
						UNF::Normalizer::FORM_NFKD,UNF::Normalizer::FORM_NFKC};
  static const TEST_FN_T test_fn[] = {nfd_test, nfc_test, nfkd_test, nfkc_test};
  static const char* form_names[5] = {"NFD ", "NFC ", "NFKD", "NFKC"};

  for(int formid=0; formid < 4; formid++)
    if(test_fn[formid](norm, ary)==false) {
      std::cerr << "Failed(" << entry_id << "): " << form_names[formid] << std::endl;
      for(unsigned i=0; i < ary.size(); i++) 
	std::cerr << " " << ary[i] << "\t -> " << norm.normalize(ary[i].c_str(), forms[formid]) << std::endl;
      return false;
    }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r12d
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movq %rsi, %rdi
movq %r14, %rsi
callq 0x232c
xorl %ebp, %ebp
testb %al, %al
je 0x2714
leaq 0x65676(%rip), %rbx     # 0x67d60
cmpq $0x3, %rbp
je 0x289b
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq *0x8(%rbx,%rbp,8)
incq %rbp
testb %al, %al
jne 0x26ea
leaq -0x1(%rbp), %rax
cmpq $0x3, %rax
setae %bl
jmp 0x2716
xorl %ebx, %ebx
movq 0x658cb(%rip), %r15     # 0x67fe8
leaq 0x1920(%rip), %rsi      # 0x4044
movl $0x7, %edx
movq %r15, %rdi
callq 0x2150
movq %r15, %rdi
movl %r12d, %esi
callq 0x21b0
movq %rax, %r15
leaq 0x1906(%rip), %rsi      # 0x404c
movl $0x3, %edx
movq %rax, %rdi
callq 0x2150
leaq 0x65626(%rip), %rax     # 0x67d80
movq (%rax,%rbp,8), %r12
movq %r12, %rdi
callq 0x2080
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x2150
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq 0x8(%r14), %rax
cmpq (%r14), %rax
je 0x289e
movq %rbx, 0x10(%rsp)
movl $0x1, %ebx
xorl %r13d, %r13d
movq 0x6582c(%rip), %r12     # 0x67fe8
movl $0x1, %edx
movq %r12, %rdi
leaq 0x18ad(%rip), %rsi      # 0x4078
callq 0x2150
movq (%r14), %rax
shlq $0x5, %r13
movq (%rax,%r13), %rsi
movq 0x8(%rax,%r13), %rdx
movq %r12, %rdi
callq 0x2150
movq %rax, %r15
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1856(%rip), %rsi      # 0x4050
callq 0x2150
movq (%r14), %rax
movq (%rax,%r13), %rsi
leaq 0x1813(%rip), %rax      # 0x4020
movl (%rax,%rbp,4), %edx
movq 0x8(%rsp), %rdi
callq 0x2c3c
testq %rax, %rax
je 0x283a
movq %rax, %r13
movq %rax, %rdi
callq 0x2080
movq %r15, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x2150
jmp 0x2854
movq (%r15), %rax
movq -0x18(%rax), %rax
movq %r15, %rdi
addq %rax, %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x21a0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq 0x8(%r14), %rax
subq (%r14), %rax
movl %ebx, %r13d
sarq $0x5, %rax
incl %ebx
cmpq %r13, %rax
ja 0x27bc
movq 0x10(%rsp), %rbx
jmp 0x289e
setae %bl
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq