// File: /workspace/github_cpp_makefile_star2_O1/lemire[P]validateutf8-experiments/benchmarks/benchmark.cpp
// Function: Benchmark::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;
    RandomUTF8 gen_1byte(rd, 1, 0, 0, 0);
    RandomUTF8 gen_2bytes(rd, 0, 1, 0, 0);
    RandomUTF8 gen_1_2(rd, 1, 1, 0, 0);
    RandomUTF8 gen_1_2_3(rd, 1, 1, 1, 0);
    RandomUTF8 gen_1_2_3_4(rd, 1, 1, 1, 1);
    RandomUTF8 gen_3bytes(rd, 0, 0, 1, 0);
    RandomUTF8 gen_4bytes(rd, 0, 0, 0, 1);
    printf("Input size: (UTF8) %lu\n", size);

    puts("- ASCII characters");
    run(gen_1byte, repeat);

    puts("- 1 or 2 UTF8 bytes");
    run(gen_1_2, repeat);

    puts("- 1, 2, 3 UTF8 bytes");
    run(gen_1_2_3, repeat);

    puts("- 1, 2, 3, 4 UTF8 bytes");
    run(gen_1_2_3_4, repeat);
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x8a78, %rsp           # imm = 0x8A78
movq %rdi, %rbx
movl $0xa, %edi
callq 0x21b0
leaq 0xbfd2(%rip), %rdi      # 0x1266e
callq 0x2200
leaq 0xbfe9(%rip), %rdi      # 0x12691
callq 0x2200
leaq 0x8(%rbx), %r14
leaq 0x3b58(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xef44
leaq 0x76b0(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xef44
leaq 0x2790(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xef44
leaq 0x13c8(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0xef44
movq %rsp, %rdi
movq %r14, %rsi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0xef44
leaq 0x62e8(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0xef44
leaq 0x4f20(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xef44
movq (%rbx), %rsi
leaq 0xbe6f(%rip), %rdi      # 0x12602
xorl %eax, %eax
callq 0x2040
leaq 0xbe79(%rip), %rdi      # 0x1261a
callq 0x2200
leaq 0x3b58(%rsp), %rsi
movl $0x3e8, %edx            # imm = 0x3E8
movq %rbx, %rdi
callq 0xb5ac
leaq 0xbe6b(%rip), %rdi      # 0x1262d
callq 0x2200
leaq 0x2790(%rsp), %rsi
movl $0x3e8, %edx            # imm = 0x3E8
movq %rbx, %rdi
callq 0xb5ac
leaq 0xbe5e(%rip), %rdi      # 0x12641
callq 0x2200
leaq 0x13c8(%rsp), %rsi
movl $0x3e8, %edx            # imm = 0x3E8
movq %rbx, %rdi
callq 0xb5ac
leaq 0xbe52(%rip), %rdi      # 0x12656
callq 0x2200
movq %rsp, %rsi
movl $0x3e8, %edx            # imm = 0x3E8
movq %rbx, %rdi
callq 0xb5ac
movq 0x62c0(%rsp), %rdi
testq %rdi, %rdi
je 0x6836
movq 0x62d0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x62a8(%rsp), %rdi
testq %rdi, %rdi
je 0x6853
movq 0x62b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x7688(%rsp), %rdi
testq %rdi, %rdi
je 0x6870
movq 0x7698(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x7670(%rsp), %rdi
testq %rdi, %rdi
je 0x688d
movq 0x7680(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x13a0(%rsp), %rdi
testq %rdi, %rdi
je 0x68aa
movq 0x13b0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x1388(%rsp), %rdi
testq %rdi, %rdi
je 0x68c7
movq 0x1398(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x2768(%rsp), %rdi
testq %rdi, %rdi
je 0x68e4
movq 0x2778(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x2750(%rsp), %rdi
testq %rdi, %rdi
je 0x6901
movq 0x2760(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x3b30(%rsp), %rdi
testq %rdi, %rdi
je 0x691e
movq 0x3b40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x3b18(%rsp), %rdi
testq %rdi, %rdi
je 0x693b
movq 0x3b28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x8a50(%rsp), %rdi
testq %rdi, %rdi
je 0x6958
movq 0x8a60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x8a38(%rsp), %rdi
testq %rdi, %rdi
je 0x6975
movq 0x8a48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x4ef8(%rsp), %rdi
testq %rdi, %rdi
je 0x6992
movq 0x4f08(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x4ee0(%rsp), %rdi
testq %rdi, %rdi
je 0x69af
movq 0x4ef0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
addq $0x8a78, %rsp           # imm = 0x8A78
popq %rbx
popq %r14
retq
movq %rax, %rbx
jmp 0x69e8
movq %rax, %rbx
jmp 0x69f5
movq %rax, %rbx
jmp 0x69fd
movq %rax, %rbx
jmp 0x6a0a
movq %rax, %rbx
jmp 0x6a17
movq %rax, %rbx
jmp 0x6a24
movq %rax, %rbx
leaq 0x4f20(%rsp), %rdi
callq 0xead6
leaq 0x62e8(%rsp), %rdi
callq 0xead6
movq %rsp, %rdi
callq 0xead6
leaq 0x13c8(%rsp), %rdi
callq 0xead6
leaq 0x2790(%rsp), %rdi
callq 0xead6
leaq 0x76b0(%rsp), %rdi
callq 0xead6
leaq 0x3b58(%rsp), %rdi
callq 0xead6
movq %rbx, %rdi
callq 0x2250
nop