// File: /workspace/github_cpp_makefile_star2_O3/ctz[P]openssl-bench/bench.cc
// Function: test_handshake_resume_one(Timings&, Context&, Context&, ssl_session_st*, unsigned long)
static void test_handshake_resume_one(Timings &timings_out, Context &server_ctx,
                                      Context &client_ctx,
                                      SSL_SESSION *client_session,
                                      const size_t handshakes) {
  double time_client = 0;
  double time_server = 0;

  LatencyOutput client_latency("client");
  LatencyOutput server_latency("server");

  for (size_t i = 0; i < handshakes; i++) {
    Conn server(server_ctx.open());
    Conn client(client_ctx.open());

    client.set_sni("localhost");
    client.set_session(client_session);
    assert(SSL_SESSION_is_resumable(client_session));

    double t, time_client_one = 0, time_server_one = 0;

    t = get_time();
    client.connect();
    client.transfer_to(server);
    time_client_one += get_time() - t;

    t = get_time();
    server.accept();
    server.transfer_to(client);
    time_server_one += get_time() - t;

    t = get_time();
    client.connect();
    client.transfer_to(server);
    time_client_one += get_time() - t;

    t = get_time();
    server.accept();
    server.transfer_to(client);
    time_server_one += get_time() - t;

    assert(server.accept());
    assert(client.connect());
    assert(server.was_resumed());
    assert(client.was_resumed());
    server.ragged_close();
    client.ragged_close();

    client_latency.sample(time_client_one);
    server_latency.sample(time_server_one);
    time_client += time_client_one;
    time_server += time_server_one;
  }

  timings_out.client.store(time_client);
  timings_out.server.store(time_server);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %r8, %r14
movq %rcx, %r15
movq %rdx, 0x50(%rsp)
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x2379(%rip), %rsi      # 0x74d8
leaq 0x40(%rsp), %rdi
callq 0x6328
leaq 0x236f(%rip), %rsi      # 0x74df
leaq 0x38(%rsp), %rdi
callq 0x6328
testq %r14, %r14
je 0x5571
movq %rbx, 0x48(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x100(%rsp), %rbp
leaq 0xc8(%rsp), %rbx
leaq 0x8(%rsp), %r12
movsd %xmm0, 0x20(%rsp)
movq (%r13), %rdi
callq 0x32d0
movq %rbp, %rdi
movq %rax, %rsi
callq 0x5a14
movq 0x50(%rsp), %rax
movq (%rax), %rdi
callq 0x32d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5a14
movq %rbx, %rdi
leaq 0x225e(%rip), %rsi      # 0x7441
callq 0x620c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6792
movq %r15, %rdi
callq 0x33c0
testl %eax, %eax
je 0x55ac
movq %r12, %rdi
xorl %esi, %esi
callq 0x3470
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%rsp), %xmm0
movsd %xmm0, 0xb8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x10(%rsp), %xmm0
divsd 0x1e06(%rip), %xmm0     # 0x7038
movsd %xmm0, 0xc0(%rsp)
movq %rbx, %rdi
callq 0x6264
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x5dc8
movq %r12, %rdi
xorl %esi, %esi
callq 0x3470
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%rsp), %xmm0
movsd %xmm0, 0xa0(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x10(%rsp), %xmm0
movsd %xmm0, 0xb0(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x3470
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%rsp), %xmm0
movsd %xmm0, 0x98(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x10(%rsp), %xmm0
movsd %xmm0, 0xa8(%rsp)
movq %rbp, %rdi
callq 0x6246
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x5dc8
movq %r12, %rdi
xorl %esi, %esi
callq 0x3470
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x10(%rsp), %xmm0
movsd %xmm0, 0x90(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x3470
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%rsp), %xmm0
movsd %xmm0, 0x78(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x10(%rsp), %xmm0
movsd %xmm0, 0x88(%rsp)
movq %rbx, %rdi
callq 0x6264
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x5dc8
movq %r12, %rdi
xorl %esi, %esi
callq 0x3470
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x10(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %r12, %rdi
xorl %esi, %esi
callq 0x3470
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%rsp), %xmm0
movsd %xmm0, 0x68(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x10(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
movq %rbp, %rdi
callq 0x6246
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x5dc8
movq %r12, %rdi
xorl %esi, %esi
callq 0x3470
xorps %xmm0, %xmm0
cvtsi2sdq 0x8(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x10(%rsp), %xmm0
divsd 0x1c74(%rip), %xmm0     # 0x7038
movsd %xmm0, 0x18(%rsp)
movq %rbp, %rdi
callq 0x6246
testb %al, %al
je 0x5628
movq %rbx, %rdi
callq 0x6264
testb %al, %al
je 0x5609
movq 0x100(%rsp), %rdi
callq 0x30c0
cmpl $0x1, %eax
jne 0x55ea
movq 0xc8(%rsp), %rdi
callq 0x30c0
cmpl $0x1, %eax
jne 0x55cb
movq 0x100(%rsp), %rdi
movl $0x3, %esi
callq 0x3080
movq 0xc8(%rsp), %rdi
movl $0x3, %esi
callq 0x3080
movsd 0xc0(%rsp), %xmm1
addsd 0xb8(%rsp), %xmm1
movsd 0x1be4(%rip), %xmm0     # 0x7038
movsd 0xb0(%rsp), %xmm2
divsd %xmm0, %xmm2
addsd 0xa0(%rsp), %xmm2
subsd %xmm1, %xmm2
movsd 0xa8(%rsp), %xmm1
divsd %xmm0, %xmm1
addsd 0x98(%rsp), %xmm1
movsd 0x90(%rsp), %xmm3
divsd %xmm0, %xmm3
addsd 0x80(%rsp), %xmm3
subsd %xmm1, %xmm3
movsd 0x88(%rsp), %xmm1
divsd %xmm0, %xmm1
addsd 0x78(%rsp), %xmm1
movsd 0x30(%rsp), %xmm4
divsd %xmm0, %xmm4
addsd 0x60(%rsp), %xmm4
subsd %xmm1, %xmm4
addsd %xmm2, %xmm4
movsd %xmm4, 0x30(%rsp)
movsd 0x70(%rsp), %xmm1
divsd %xmm0, %xmm1
addsd 0x68(%rsp), %xmm1
movsd 0x18(%rsp), %xmm0
addsd 0x58(%rsp), %xmm0
subsd %xmm1, %xmm0
addsd %xmm3, %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x40(%rsp), %rdi
movapd %xmm4, %xmm0
callq 0x6490
leaq 0x38(%rsp), %rdi
movsd 0x18(%rsp), %xmm0
callq 0x6490
movsd 0x20(%rsp), %xmm0
addsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x28(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq %rbx, %rdi
callq 0x5b16
movq %rbp, %rdi
callq 0x5b16
decq %r14
jne 0x51ad
movq 0x20(%rsp), %xmm0
movq %xmm0, %rax
movq 0x28(%rsp), %xmm0
movq %xmm0, %rcx
movq 0x48(%rsp), %rbx
jmp 0x5575
xorl %eax, %eax
xorl %ecx, %ecx
xchgq %rax, (%rbx)
xchgq %rcx, 0x8(%rbx)
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x558b
callq 0x32a0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x559a
callq 0x32a0
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x208d(%rip), %rdi      # 0x7640
leaq 0x1c1e(%rip), %rsi      # 0x71d8
leaq 0x2116(%rip), %rcx      # 0x76d7
movl $0x255, %edx            # imm = 0x255
callq 0x31d0
leaq 0x1f99(%rip), %rdi      # 0x756b
leaq 0x1bff(%rip), %rsi      # 0x71d8
leaq 0x20f7(%rip), %rcx      # 0x76d7
movl $0x270, %edx            # imm = 0x270
callq 0x31d0
leaq 0x1f64(%rip), %rdi      # 0x7555
leaq 0x1be0(%rip), %rsi      # 0x71d8
leaq 0x20d8(%rip), %rcx      # 0x76d7
movl $0x26f, %edx            # imm = 0x26F
callq 0x31d0
leaq 0x1f33(%rip), %rdi      # 0x7543
leaq 0x1bc1(%rip), %rsi      # 0x71d8
leaq 0x20b9(%rip), %rcx      # 0x76d7
movl $0x26e, %edx            # imm = 0x26E
callq 0x31d0
leaq 0x1eb7(%rip), %rdi      # 0x74e6
leaq 0x1ba2(%rip), %rsi      # 0x71d8
leaq 0x209a(%rip), %rcx      # 0x76d7
movl $0x26d, %edx            # imm = 0x26D
callq 0x31d0
movq %rax, %rbx
jmp 0x5684
movq %rax, %rbx
jmp 0x5675
movq %rax, %rbx
jmp 0x5668
jmp 0x5658
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x5b16
leaq 0x100(%rsp), %rdi
callq 0x5b16
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x5684
callq 0x32a0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x5693
callq 0x32a0
movq %rbx, %rdi
callq 0x34c0