// File: /workspace/github_cpp_makefile_star2_O1/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 0x2381(%rip), %rsi      # 0x74d8
leaq 0x20(%rsp), %rdi
callq 0x633c
leaq 0x2377(%rip), %rsi      # 0x74df
leaq 0x18(%rsp), %rdi
callq 0x633c
testq %r14, %r14
je 0x5569
movq %rbx, 0x48(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
leaq 0x100(%rsp), %rbp
leaq 0xc8(%rsp), %rbx
leaq 0x8(%rsp), %r12
movsd %xmm0, 0x30(%rsp)
movq (%r13), %rdi
callq 0x32d0
movq %rbp, %rdi
movq %rax, %rsi
callq 0x5a48
movq 0x50(%rsp), %rax
movq (%rax), %rdi
callq 0x32d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5a48
movq %rbx, %rdi
leaq 0x2266(%rip), %rsi      # 0x7441
callq 0x6210
movq %rbx, %rdi
movq %r15, %rsi
callq 0x67b6
movq %r15, %rdi
callq 0x33c0
testl %eax, %eax
je 0x55b6
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 0x1e0e(%rip), %xmm0     # 0x7038
movsd %xmm0, 0xc0(%rsp)
movq %rbx, %rdi
callq 0x6268
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x5dfe
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 0x624a
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x5dfe
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 0x6268
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x5dfe
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, 0x40(%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 0x624a
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x5dfe
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 0x1c7c(%rip), %xmm0     # 0x7038
movsd %xmm0, 0x28(%rsp)
movq %rbp, %rdi
callq 0x624a
testb %al, %al
je 0x5632
movq %rbx, %rdi
callq 0x6268
testb %al, %al
je 0x5613
movq 0x100(%rsp), %rdi
callq 0x30c0
cmpl $0x1, %eax
jne 0x55f4
movq 0xc8(%rsp), %rdi
callq 0x30c0
cmpl $0x1, %eax
jne 0x55d5
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 0x1bec(%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 0x40(%rsp), %xmm4
divsd %xmm0, %xmm4
addsd 0x60(%rsp), %xmm4
subsd %xmm1, %xmm4
addsd %xmm2, %xmm4
movsd %xmm4, 0x40(%rsp)
movsd 0x70(%rsp), %xmm1
divsd %xmm0, %xmm1
addsd 0x68(%rsp), %xmm1
movsd 0x28(%rsp), %xmm0
addsd 0x58(%rsp), %xmm0
subsd %xmm1, %xmm0
addsd %xmm3, %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x20(%rsp), %rdi
movapd %xmm4, %xmm0
callq 0x64a4
leaq 0x18(%rsp), %rdi
movsd 0x28(%rsp), %xmm0
callq 0x64a4
movsd 0x30(%rsp), %xmm0
addsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x38(%rsp), %xmm0
addsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbx, %rdi
callq 0x5b4a
movq %rbp, %rdi
callq 0x5b4a
decq %r14
jne 0x51a5
movq 0x30(%rsp), %xmm0
movq %xmm0, %rax
movq 0x38(%rsp), %xmm0
movq %xmm0, %rcx
movq 0x48(%rsp), %rbx
jmp 0x556d
xorl %eax, %eax
xorl %ecx, %ecx
xchgq %rax, (%rbx)
xchgq %rcx, 0x8(%rbx)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x558c
callq 0x32a0
movq $0x0, 0x18(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x55a4
callq 0x32a0
movq $0x0, 0x20(%rsp)
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2083(%rip), %rdi      # 0x7640
leaq 0x1c14(%rip), %rsi      # 0x71d8
leaq 0x210c(%rip), %rcx      # 0x76d7
movl $0x255, %edx            # imm = 0x255
callq 0x31d0
leaq 0x1f8f(%rip), %rdi      # 0x756b
leaq 0x1bf5(%rip), %rsi      # 0x71d8
leaq 0x20ed(%rip), %rcx      # 0x76d7
movl $0x270, %edx            # imm = 0x270
callq 0x31d0
leaq 0x1f5a(%rip), %rdi      # 0x7555
leaq 0x1bd6(%rip), %rsi      # 0x71d8
leaq 0x20ce(%rip), %rcx      # 0x76d7
movl $0x26f, %edx            # imm = 0x26F
callq 0x31d0
leaq 0x1f29(%rip), %rdi      # 0x7543
leaq 0x1bb7(%rip), %rsi      # 0x71d8
leaq 0x20af(%rip), %rcx      # 0x76d7
movl $0x26e, %edx            # imm = 0x26E
callq 0x31d0
leaq 0x1ead(%rip), %rdi      # 0x74e6
leaq 0x1b98(%rip), %rsi      # 0x71d8
leaq 0x2090(%rip), %rcx      # 0x76d7
movl $0x26d, %edx            # imm = 0x26D
callq 0x31d0
movq %rax, %rbx
jmp 0x5697
movq %rax, %rbx
jmp 0x567f
movq %rax, %rbx
jmp 0x5672
jmp 0x5662
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x5b4a
leaq 0x100(%rsp), %rdi
callq 0x5b4a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5697
callq 0x32a0
movq $0x0, 0x18(%rsp)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x56af
callq 0x32a0
movq $0x0, 0x20(%rsp)
movq %rbx, %rdi
callq 0x34c0