// File: /workspace/github_cpp_makefile_star2_O1/lemire[P]validateutf8-experiments/benchmarks/benchmark.cpp
// Function: RealDataBenchmark::run()
void run() {
    printf("\n");
    printf("Running UTF8 validation benchmark.\n");
    printf("The speed is normalized by the number of input bytes.\n");
    const size_t repeat = 1000;
    for (std::string filename : filenames) {
      std::ifstream in(filename);
      if (!in) {
        std::cerr << " I cannot load " << filename << std::endl;
        continue;
      }
      std::vector<char> utf8((std::istreambuf_iterator<char>(in)),
                             std::istreambuf_iterator<char>());
      std::cout << "file: " << filename << " (" << utf8.size() / 1000 << "KB)"
                << std::endl;

      run(utf8, repeat);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdi, %r14
movl $0xa, %edi
callq 0x21b0
leaq 0xc28d(%rip), %rdi      # 0x1266e
callq 0x2200
leaq 0xc2a4(%rip), %rdi      # 0x12691
callq 0x2200
movq (%r14), %rbx
movq %r14, 0x48(%rsp)
movq 0x8(%r14), %r13
cmpq %r13, %rbx
je 0x65d7
leaq 0x20(%rsp), %rbp
leaq 0x10(%rsp), %r14
leaq 0x50(%rsp), %r15
movq %rbp, 0x10(%rsp)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x6c70
movq %r15, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x2210
movq 0x50(%rsp), %rax
movq -0x18(%rax), %rcx
testb $0x5, 0x70(%rsp,%rcx)
je 0x64aa
movl $0xf, %edx
movq 0xfb97(%rip), %rdi      # 0x15ff0
leaq 0xbf50(%rip), %rsi      # 0x123b0
callq 0x2180
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0xfb7a(%rip), %rdi      # 0x15ff0
callq 0x2180
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
jmp 0x65ab
movq -0x18(%rax), %rax
movq 0x138(%rsp,%rax), %rsi
leaq 0x30(%rsp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
leaq 0xf(%rsp), %r9
callq 0x6d00
movl $0x6, %edx
movq 0xfaf2(%rip), %rdi      # 0x15fd0
leaq 0xbedb(%rip), %rsi      # 0x123c0
callq 0x2180
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0xfad5(%rip), %rdi      # 0x15fd0
callq 0x2180
movq %rax, %r12
movl $0x2, %edx
movq %rax, %rdi
leaq 0xbeb5(%rip), %rsi      # 0x123c7
callq 0x2180
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
mulq %rcx
shrq $0x4, %rdx
movq %r12, %rdi
movq %rdx, %rsi
callq 0x20d0
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0xbe77(%rip), %rsi      # 0x123ca
callq 0x2180
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movl $0x3e8, %edx            # imm = 0x3E8
movq 0x48(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6d42
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x65ab
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq %r15, %rdi
callq 0x2060
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x65ca
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2170
addq $0x20, %rbx
cmpq %r13, %rbx
jne 0x6416
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x65f0
movq %rax, %rbx
jmp 0x6619
movq %rax, %rbx
jmp 0x660f
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x660f
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
leaq 0x50(%rsp), %rdi
callq 0x2060
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x6630
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x2250