// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x8a78, %rsp           # imm = 0x8A78
movq %rdi, %r15
pushq $0xa
popq %rdi
callq 0x21e0
leaq 0xa49f(%rip), %rdi      # 0x1068e
callq 0x2240
leaq 0xa4b6(%rip), %rdi      # 0x106b1
callq 0x2240
leaq 0x8(%r15), %r12
leaq 0x62e8(%rsp), %rdi
pushq $0x1
popq %rbx
movq %r12, %rsi
movl %ebx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xcb10
leaq 0x4f20(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xcb10
leaq 0x3b58(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r12, %rsi
movl %ecx, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xcb10
leaq 0x2790(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r12, %rsi
movl %ecx, %edx
movl %ecx, %r8d
xorl %r9d, %r9d
callq 0xcb10
leaq 0x13c8(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r12, %rsi
movl %ecx, %edx
movl %ecx, %r8d
movl %ecx, %r9d
callq 0xcb10
movq %rsp, %rdi
pushq $0x1
popq %r8
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0xcb10
leaq 0x76b0(%rsp), %r13
pushq $0x1
popq %r9
movq %r13, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xcb10
movq (%r15), %rsi
leaq 0xa358(%rip), %rdi      # 0x10622
xorl %eax, %eax
callq 0x2030
leaq 0xa362(%rip), %rdi      # 0x1063a
callq 0x2240
leaq 0x62e8(%rsp), %r12
movl $0x3e8, %edx            # imm = 0x3E8
movq %r15, %rdi
movq %r12, %rsi
callq 0xa06c
leaq 0xa351(%rip), %rdi      # 0x1064d
callq 0x2240
leaq 0x3b58(%rsp), %rbp
movl $0x3e8, %edx            # imm = 0x3E8
movq %r15, %rdi
movq %rbp, %rsi
callq 0xa06c
leaq 0xa341(%rip), %rdi      # 0x10661
callq 0x2240
leaq 0x2790(%rsp), %rbx
movl $0x3e8, %edx            # imm = 0x3E8
movq %r15, %rdi
movq %rbx, %rsi
callq 0xa06c
leaq 0xa332(%rip), %rdi      # 0x10676
callq 0x2240
leaq 0x13c8(%rsp), %r14
movl $0x3e8, %edx            # imm = 0x3E8
movq %r15, %rdi
movq %r14, %rsi
callq 0xa06c
movl $0x1388, %r15d          # imm = 0x1388
addq %r15, %r13
movq %r13, %rdi
callq 0xc9e6
movq %rsp, %rdi
addq %r15, %rdi
callq 0xc9e6
addq %r15, %r14
movq %r14, %rdi
callq 0xc9e6
addq %r15, %rbx
movq %rbx, %rdi
callq 0xc9e6
addq %r15, %rbp
movq %rbp, %rdi
callq 0xc9e6
leaq 0x4f20(%rsp), %rdi
addq %r15, %rdi
callq 0xc9e6
addq %r15, %r12
movq %r12, %rdi
callq 0xc9e6
addq $0x8a78, %rsp           # imm = 0x8A78
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x63f9
movq %rax, %rbx
jmp 0x6406
movq %rax, %rbx
jmp 0x6413
movq %rax, %rbx
jmp 0x6420
movq %rax, %rbx
jmp 0x642d
movq %rax, %rbx
jmp 0x643a
movq %rax, %rbx
leaq 0x8a38(%rsp), %rdi
callq 0xc9e6
leaq 0x1388(%rsp), %rdi
callq 0xc9e6
leaq 0x2750(%rsp), %rdi
callq 0xc9e6
leaq 0x3b18(%rsp), %rdi
callq 0xc9e6
leaq 0x4ee0(%rsp), %rdi
callq 0xc9e6
leaq 0x62a8(%rsp), %rdi
callq 0xc9e6
leaq 0x7670(%rsp), %rdi
callq 0xc9e6
movq %rbx, %rdi
callq 0x2290
nop