// File: /workspace/github_cpp_makefile_star2_O3/ctz[P]openssl-bench/bench.cc
// Function: print_results(char const*, char const*, std::vector<Timings, std::allocator<Timings>> const&, double, char const*)
static void print_results(const char *server, const char *client,
                          const std::vector<Timings> &thread_timings,
                          const double thread_work, const char *units) {
  const size_t n_threads = thread_timings.size();
  if (n_threads > 1) {
    printf("%s\tthreads\t%zu\t", server, n_threads);
    double total_server = 0.;

    for (unsigned i = 0; i < n_threads; i++) {
      const double server = thread_work / thread_timings[i].server.load();
      total_server += server;
      printf("%g\t", server);
    }
    printf("total\t%g\tper-thread\t%g\t%s\n", total_server,
           total_server / n_threads, units);
    printf("%s\tthreads\t%zu\t", client, n_threads);
    double total_client = 0.;

    for (unsigned i = 0; i < n_threads; i++) {
      const double client = thread_work / thread_timings[i].client.load();
      total_client += client;
      printf("%g\t", client);
    }
    printf("total\t%g\tper-thread\t%g\t%s\n", total_client,
           total_client / n_threads, units);
  } else {
    printf("%s\t%g\t%s\n", server,
           thread_work / thread_timings[0].server.load(), units);
    printf("%s\t%g\t%s\n", client,
           thread_work / thread_timings[0].client.load(), units);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rsi
movq (%rdx), %rax
movq 0x8(%rdx), %r15
subq %rax, %r15
sarq $0x4, %r15
cmpq $0x2, %r15
movsd %xmm0, 0x10(%rsp)
jb 0x4b3a
movq %r12, 0x20(%rsp)
leaq 0x2a3f(%rip), %rdi      # 0x746c
xorl %r12d, %r12d
movq %r15, %rdx
xorl %eax, %eax
callq 0x3050
xorpd %xmm2, %xmm2
movl $0x1, %ebp
leaq 0x2a32(%rip), %r13      # 0x747c
movq (%r14), %rax
shlq $0x4, %r12
movsd 0x10(%rsp), %xmm0
divsd 0x8(%rax,%r12), %xmm0
addsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rsp)
movq %r13, %rdi
movb $0x1, %al
callq 0x3050
movsd 0x8(%rsp), %xmm2
movl %ebp, %r12d
incl %ebp
cmpq %r12, %r15
ja 0x4a4a
xorps %xmm0, %xmm0
cvtsi2sd %r15, %xmm0
movapd %xmm2, %xmm1
movsd %xmm0, 0x18(%rsp)
divsd %xmm0, %xmm1
leaq 0x29e1(%rip), %rdi      # 0x7480
movapd %xmm2, %xmm0
movq %rbx, %rsi
movb $0x2, %al
callq 0x3050
leaq 0x29b8(%rip), %rdi      # 0x746c
xorl %r13d, %r13d
movq 0x20(%rsp), %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x3050
xorpd %xmm2, %xmm2
movl $0x1, %ebp
leaq 0x29a6(%rip), %r12      # 0x747c
movq (%r14), %rax
shlq $0x4, %r13
movsd 0x10(%rsp), %xmm0
divsd (%rax,%r13), %xmm0
addsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rsp)
movq %r12, %rdi
movb $0x1, %al
callq 0x3050
movsd 0x8(%rsp), %xmm2
movl %ebp, %r13d
incl %ebp
cmpq %r13, %r15
ja 0x4ad6
movapd %xmm2, %xmm1
divsd 0x18(%rsp), %xmm1
leaq 0x2962(%rip), %rdi      # 0x7480
movapd %xmm2, %xmm0
movq %rbx, %rsi
movb $0x2, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3050
divsd 0x8(%rax), %xmm0
leaq 0x2955(%rip), %r15      # 0x749b
movq %r15, %rdi
movq %rbx, %rdx
movb $0x1, %al
callq 0x3050
movq (%r14), %rax
movsd 0x10(%rsp), %xmm0
divsd (%rax), %xmm0
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3050