// File: /workspace/github_cpp_makefile_star2_O3/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 0xc0dc(%rip), %rdi      # 0x12646
callq 0x2200
leaq 0xc0f3(%rip), %rdi      # 0x12669
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 0xed44
leaq 0x76b0(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xed44
leaq 0x2790(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xed44
leaq 0x13c8(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0xed44
movq %rsp, %rdi
movq %r14, %rsi
movl $0x1, %edx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0xed44
leaq 0x62e8(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0xed44
leaq 0x4f20(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xed44
movq (%rbx), %rsi
leaq 0xbf79(%rip), %rdi      # 0x125da
xorl %eax, %eax
callq 0x2040
leaq 0xbf83(%rip), %rdi      # 0x125f2
callq 0x2200
leaq 0x3b58(%rsp), %rsi
movl $0x3e8, %edx            # imm = 0x3E8
movq %rbx, %rdi
callq 0xb41e
leaq 0xbf75(%rip), %rdi      # 0x12605
callq 0x2200
leaq 0x2790(%rsp), %rsi
movl $0x3e8, %edx            # imm = 0x3E8
movq %rbx, %rdi
callq 0xb41e
leaq 0xbf68(%rip), %rdi      # 0x12619
callq 0x2200
leaq 0x13c8(%rsp), %rsi
movl $0x3e8, %edx            # imm = 0x3E8
movq %rbx, %rdi
callq 0xb41e
leaq 0xbf5c(%rip), %rdi      # 0x1262e
callq 0x2200
movq %rsp, %rsi
movl $0x3e8, %edx            # imm = 0x3E8
movq %rbx, %rdi
callq 0xb41e
movq 0x62c0(%rsp), %rdi
testq %rdi, %rdi
je 0x6704
movq 0x62d0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x62a8(%rsp), %rdi
testq %rdi, %rdi
je 0x6721
movq 0x62b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x7688(%rsp), %rdi
testq %rdi, %rdi
je 0x673e
movq 0x7698(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x7670(%rsp), %rdi
testq %rdi, %rdi
je 0x675b
movq 0x7680(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x13a0(%rsp), %rdi
testq %rdi, %rdi
je 0x6778
movq 0x13b0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x1388(%rsp), %rdi
testq %rdi, %rdi
je 0x6795
movq 0x1398(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x2768(%rsp), %rdi
testq %rdi, %rdi
je 0x67b2
movq 0x2778(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x2750(%rsp), %rdi
testq %rdi, %rdi
je 0x67cf
movq 0x2760(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x3b30(%rsp), %rdi
testq %rdi, %rdi
je 0x67ec
movq 0x3b40(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x3b18(%rsp), %rdi
testq %rdi, %rdi
je 0x6809
movq 0x3b28(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x8a50(%rsp), %rdi
testq %rdi, %rdi
je 0x6826
movq 0x8a60(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x8a38(%rsp), %rdi
testq %rdi, %rdi
je 0x6843
movq 0x8a48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x4ef8(%rsp), %rdi
testq %rdi, %rdi
je 0x6860
movq 0x4f08(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
movq 0x4ee0(%rsp), %rdi
testq %rdi, %rdi
je 0x687d
movq 0x4ef0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2170
addq $0x8a78, %rsp           # imm = 0x8A78
popq %rbx
popq %r14
retq
movq %rax, %rbx
jmp 0x68b6
movq %rax, %rbx
jmp 0x68c3
movq %rax, %rbx
jmp 0x68cb
movq %rax, %rbx
jmp 0x68d8
movq %rax, %rbx
jmp 0x68e5
movq %rax, %rbx
jmp 0x68f2
movq %rax, %rbx
leaq 0x4f20(%rsp), %rdi
callq 0xe968
leaq 0x62e8(%rsp), %rdi
callq 0xe968
movq %rsp, %rdi
callq 0xe968
leaq 0x13c8(%rsp), %rdi
callq 0xe968
leaq 0x2790(%rsp), %rdi
callq 0xe968
leaq 0x76b0(%rsp), %rdi
callq 0xe968
leaq 0x3b58(%rsp), %rdi
callq 0xe968
movq %rbx, %rdi
callq 0x2250
nop