user: Translate the below assembly code into C programming language:

```asm
<ssl3_connect>:
  endbr64
  push   %r15
  xor    %eax,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,0x20(%rsp)
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %rax,0x10(%rsp)
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r13d
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %rax,0x38(%rsp)
  mov    %eax,%r14d
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,0xc(%rsp)
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %rax,0x28(%rsp)
  mov    %eax,%ebx
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,0x30(%rsp)
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %rax,%rbp
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,0x24(%rsp)
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %rax,%r12
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %rax,%r15
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %rax,0x40(%rsp)
  mov    %eax,0x34(%rsp)
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  test   %ebp,%ebp
  mov    0x18(%rsp),%rsi
  mov    0x20(%rsp),%edi
  sete   %bpl
  cmpl   $0x10200,0x10(%rsp)
  setne  %al
  or     %eax,%ebp
  test   %esi,%esi
  sete   %al
  or     %eax,%ebp
  test   %r12d,%r12d
  sete   %cl
  test   %r15d,%r15d
  lea    D3(%rip),%r15
  sete   %al
  xor    %r12d,%r12d
  or     %eax,%ecx
  mov    %cl,0x10(%rsp)
L590:
  cmp    $0x3004,%edi
  je     L629
  cmp    $0x11b1,%edi
  jg     L442
  cmp    $0x10ff,%edi
  jle    L989
  sub    $0x1100,%edi
  cmp    $0xb1,%edi
  ja     L987
  movslq (%r15,%rdi,4),%rax
  add    %r15,%rax
  notrack jmp *%rax
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  test   %ebx,%ebx
  jne    L144
L450:
  test   %r14d,%r14d
  jne    L378
L144:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  cmpl   $0x1,0xc(%rsp)
  jne    L689
  test   %ebx,%ebx
  je     L80
  nopw   0x0(%rax,%rax,1)
L1212:
  xor    %eax,%eax
L739:
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
L98:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  cmpb   $0x0,0x10(%rsp)
  jne    L987
  test   %ebx,%ebx
  je     L512
L1204:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  addl   $0x5,0x48(%rsp)
  test   %r13d,%r13d
  je     L354
  cmpl   $0x2,0x48(%rsp)
  je     L1195
  mov    0x28(%rsp),%ecx
  test   %ecx,%ecx
  jne    L325
L687:
  mov    0x38(%rsp),%edx
  test   %edx,%edx
  jne    L227
L325:
  mov    $0x1,%r8d
L570:
  add    $0x58,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L989:
  cmp    $0x1000,%edi
  je     L629
  cmp    $0x1003,%edi
  jne    L105
L629:
  test   %bpl,%bpl
  jne    L987
  test   %ebx,%ebx
  jne    L1010
  test   %r14d,%r14d
  je     L1010
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  nopl   0x0(%rax)
L1010:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %r12d,%r12d
  je     L299
  cmp    $0x4,%r12d
  je     L1143
  test   %eax,%eax
  jle    L570
  test   %ebx,%ebx
  je     L800
L792:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  cmp    $0x1,%r12d
  je     L1141
L141:
  test   %r8d,%r8d
  jle    L570
  test   %r13d,%r13d
  je     L366
  test   %ebx,%ebx
  jne    L1212
  test   %r14d,%r14d
  je     L1212
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jg     L432
  jmp    L570
  nopl   0x0(%rax,%rax,1)
L366:
  test   %ebx,%ebx
  je     L822
L434:
  cmpl   $0x100,0x30(%rsp)
  je     L65
L1006:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  cmp    $0x3,%r12d
  mov    $0x4,%edx
  cmove  %edx,%r12d
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  mov    0x24(%rsp),%r8d
  test   %r8d,%r8d
  je     L987
  test   %ebx,%ebx
  je     L828
L330:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  cmp    $0x5,%r12d
  je     L106
  test   %eax,%eax
  jle    L570
  test   %ebx,%ebx
  je     L549
L256:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  mov    0xc(%rsp),%edi
  test   %edi,%edi
  je     L1038
  test   %ebx,%ebx
  jne    L378
  test   %r14d,%r14d
  je     L378
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jg     L450
  jmp    L570
  nop
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
L689:
  test   %ebx,%ebx
  jne    L98
L1132:
  test   %r14d,%r14d
  je     L98
  jmp    L1212
  nopl   0x0(%rax,%rax,1)
L442:
  cmp    $0x4000,%edi
  je     L629
  jle    L748
  cmp    $0x5000,%edi
  je     L629
  nopw   0x0(%rax,%rax,1)
L987:
  mov    $0xffffffff,%r8d
  jmp    L570
  nopl   0x0(%rax,%rax,1)
L354:
  test   %ebx,%ebx
  je     L215
L88:
  mov    0x34(%rsp),%r9d
  test   %r9d,%r9d
  jle    L987
  mov    $0x11d0,%edi
L748:
  sub    $0x11d0,%edi
  cmp    $0x1,%edi
  ja     L987
L432:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  test   %r13d,%r13d
  jne    L689
  mov    0x28(%rsp),%ecx
  test   %ecx,%ecx
  jne    L325
  jmp    L687
  xchg   %ax,%ax
L299:
  test   %eax,%eax
  jle    L570
  test   %ebx,%ebx
  jne    L521
  test   %r14d,%r14d
  je     L521
  mov    $0x1,%r12d
L735:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jg     L792
  jmp    L570
  cs nopw 0x0(%rax,%rax,1)
L1038:
  test   %ebx,%ebx
  jne    L1212
  xor    %eax,%eax
  test   %r14d,%r14d
  je     L739
  jmp    L553
  nopl   0x0(%rax,%rax,1)
L549:
  test   %r14d,%r14d
  je     L256
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jg     L256
  jmp    L570
L828:
  test   %r14d,%r14d
  je     L330
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jg     L330
  jmp    L570
L512:
  test   %r14d,%r14d
  je     L1204
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jg     L1204
  jmp    L570
L65:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  cmp    $0x2,%r12d
  mov    $0x3,%edx
  cmove  %edx,%r12d
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  test   %ebx,%ebx
  jne    L1006
  test   %r14d,%r14d
  je     L1006
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jg     L1006
  jmp    L570
  nopw   0x0(%rax,%rax,1)
L378:
  xor    %eax,%eax
L553:
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jg     L144
  jmp    L570
  nopw   0x0(%rax,%rax,1)
L521:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
L1141:
  mov    $0x2,%r12d
  jmp    L141
  nopl   (%rax)
L215:
  test   %r14d,%r14d
  je     L88
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  mov    0x34(%rsp),%esi
  test   %esi,%esi
  jle    L987
  movl   $0x11d0,0x4c(%rsp)
L1080:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
L383:
  mov    0x4c(%rsp),%edi
  jmp    L590
L1195:
  test   %ebx,%ebx
  je     L743
  cmpl   $0x0,0x40(%rsp)
  jg     L325
  jmp    L987
  nopw   0x0(%rax,%rax,1)
L80:
  test   %r14d,%r14d
  je     L1212
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jg     L1132
  jmp    L570
  nopw   0x0(%rax,%rax,1)
L227:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  mov    $0x1,%r8d
  jmp    L570
L1143:
  test   %eax,%eax
  jle    L570
  test   %ebx,%ebx
  jne    L401
  test   %r14d,%r14d
  jne    L1090
L401:
  xor    %eax,%eax
  mov    $0x5,%r12d
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  jmp    L141
L743:
  test   %r14d,%r14d
  jne    L1106
  mov    0x34(%rsp),%r10d
  test   %r10d,%r10d
  jg     L325
  jmp    L987
L822:
  test   %r14d,%r14d
  je     L434
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jg     L434
  jmp    L570
L800:
  test   %r14d,%r14d
  je     L792
  jmp    L735
  nopl   (%rax)
L1106:
  xor    %eax,%eax
  call   <__VERIFIER_nondet_int@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  jle    L570
  mov    0x34(%rsp),%eax
  test   %eax,%eax
  jle    L987
  movl   $0x3,0x4c(%rsp)
  jmp    L1080
  cmpl   $0x0,0x34(%rsp)
  jle    L987
  test   %ebx,%ebx
  jne    L383
  test   %r14d,%r14d
  je     L383
  jmp    L1080
  nopl   0x0(%rax)
L106:
  xor    %eax,%eax
  call   <__VERIFIER_error@plt>
  jmp    L987
L105:
  cmp    $0x3,%edi
  je     L325
  jmp    L987
L1090:
  mov    $0x5,%r12d
  jmp    L735
```

assistant: ```c
int ssl3_connect(int initial_state) {
  int s__info_callback = __VERIFIER_nondet_int();
  int s__in_handshake = __VERIFIER_nondet_int();
  int s__state;
  int s__new_session;
  int s__server;
  int s__version = __VERIFIER_nondet_int();
  int s__type;
  int s__init_num;
  int s__bbio = __VERIFIER_nondet_int();
  int s__wbio = __VERIFIER_nondet_int();
  int s__hit = __VERIFIER_nondet_int();
  int s__rwstate;
  int s__init_buf___0;
  int s__debug = __VERIFIER_nondet_int();
  int s__shutdown;
  int s__ctx__info_callback = __VERIFIER_nondet_int();
  int s__ctx__stats__sess_connect_renegotiate = __VERIFIER_nondet_int();
  int s__ctx__stats__sess_connect = __VERIFIER_nondet_int();
  int s__ctx__stats__sess_hit = __VERIFIER_nondet_int();
  int s__ctx__stats__sess_connect_good = __VERIFIER_nondet_int();
  int s__s3__change_cipher_spec;
  int s__s3__flags;
  int s__s3__delay_buf_pop_ret;
  int s__s3__tmp__cert_req = __VERIFIER_nondet_int();
  int s__s3__tmp__new_compression = __VERIFIER_nondet_int();
  int s__s3__tmp__reuse_message = __VERIFIER_nondet_int();
  int s__s3__tmp__new_cipher = __VERIFIER_nondet_int();
  int s__s3__tmp__new_cipher__algorithms = __VERIFIER_nondet_int();
  int s__s3__tmp__next_state___0;
  int s__s3__tmp__new_compression__id = __VERIFIER_nondet_int();
  int s__session__cipher;
  int s__session__compress_meth;
  int buf;
  unsigned long tmp;
  unsigned long l;
  int num1;
  int cb;
  int ret;
  int new_state;
  int state;
  int skip;
  int tmp___0;
  int tmp___1 = __VERIFIER_nondet_int();
  int tmp___2 = __VERIFIER_nondet_int();
  int tmp___3 = __VERIFIER_nondet_int();
  int tmp___4 = __VERIFIER_nondet_int();
  int tmp___5 = __VERIFIER_nondet_int();
  int tmp___6 = __VERIFIER_nondet_int();
  int tmp___7 = __VERIFIER_nondet_int();
  int tmp___8 = __VERIFIER_nondet_int();
  int tmp___9 = __VERIFIER_nondet_int();
  int blastFlag;
  int __cil_tmp55;
  unsigned long __cil_tmp56;
  long __cil_tmp57;
  long __cil_tmp58;
  long __cil_tmp59;
  long __cil_tmp60;
  long __cil_tmp61;
  long __cil_tmp62;
  long __cil_tmp63;
  long __cil_tmp64;
  long __cil_tmp65;
  {
    ;
    s__state = initial_state;
    blastFlag = 0;
    tmp = __VERIFIER_nondet_int();
    cb = 0;
    ret = -1;
    skip = 0;
    tmp___0 = 0;
    if (s__info_callback != 0) {
      cb = s__info_callback;
    } else {
      if (s__ctx__info_callback != 0) {
        cb = s__ctx__info_callback;
      }
    }
    s__in_handshake++;
    if (tmp___1 - 12288) {
      if (tmp___2 - 16384) {
      }
    }
    {
      while (1) {
      while_0_continue:;
        state = s__state;
        if (s__state == 12292) {
          goto switch_1_12292;
        } else {
          if (s__state == 16384) {
            goto switch_1_16384;
          } else {
            if (s__state == 4096) {
              goto switch_1_4096;
            } else {
              if (s__state == 20480) {
                goto switch_1_20480;
              } else {
                if (s__state == 4099) {
                  goto switch_1_4099;
                } else {
                  if (s__state == 4368) {
                    goto switch_1_4368;
                  } else {
                    if (s__state == 4369) {
                      goto switch_1_4369;
                    } else {
                      if (s__state == 4384) {
                        goto switch_1_4384;
                      } else {
                        if (s__state == 4385) {
                          goto switch_1_4385;
                        } else {
                          if (s__state == 4400) {
                            goto switch_1_4400;
                          } else {
                            if (s__state == 4401) {
                              goto switch_1_4401;
                            } else {
                              if (s__state == 4416) {
                                goto switch_1_4416;
                              } else {
                                if (s__state == 4417) {
                                  goto switch_1_4417;
                                } else {
                                  if (s__state == 4432) {
                                    goto switch_1_4432;
                                  } else {
                                    if (s__state == 4433) {
                                      goto switch_1_4433;
                                    } else {
                                      if (s__state == 4448) {
                                        goto switch_1_4448;
                                      } else {
                                        if (s__state == 4449) {
                                          goto switch_1_4449;
                                        } else {
                                          if (s__state == 4464) {
                                            goto switch_1_4464;
                                          } else {
                                            if (s__state == 4465) {
                                              goto switch_1_4465;
                                            } else {
                                              if (s__state == 4466) {
                                                goto switch_1_4466;
                                              } else {
                                                if (s__state == 4467) {
                                                  goto switch_1_4467;
                                                } else {
                                                  if (s__state == 4480) {
                                                    goto switch_1_4480;
                                                  } else {
                                                    if (s__state == 4481) {
                                                      goto switch_1_4481;
                                                    } else {
                                                      if (s__state == 4496) {
                                                        goto switch_1_4496;
                                                      } else {
                                                        if (s__state == 4497) {
                                                          goto switch_1_4497;
                                                        } else {
                                                          if (s__state == 4512) {
                                                            goto switch_1_4512;
                                                          } else {
                                                            if (s__state == 4513) {
                                                              goto switch_1_4513;
                                                            } else {
                                                              if (s__state == 4528) {
                                                                goto switch_1_4528;
                                                              } else {
                                                                if (s__state == 4529) {
                                                                  goto switch_1_4529;
                                                                } else {
                                                                  if (s__state == 4560) {
                                                                    goto switch_1_4560;
                                                                  } else {
                                                                    if (s__state == 4561) {
                                                                      goto switch_1_4561;
                                                                    } else {
                                                                      if (s__state == 4352) {
                                                                        goto switch_1_4352;
                                                                      } else {
                                                                        if (s__state == 3) {
                                                                          goto switch_1_3;
                                                                        } else {
                                                                          goto switch_1_default;
                                                                          if (0) {
                                                                          switch_1_12292:
                                                                            s__new_session = 1;
                                                                            s__state = 4096;
                                                                            s__ctx__stats__sess_connect_renegotiate++;
                                                                          switch_1_16384:;
                                                                          switch_1_4096:;
                                                                          switch_1_20480:;
                                                                          switch_1_4099:
                                                                            s__server = 0;
                                                                            if (cb != 0) {
                                                                            }
                                                                            {
                                                                              __cil_tmp55 = s__version - 65280;
                                                                              if (__cil_tmp55 != 768) {
                                                                                ret = -1;
                                                                                goto end;
                                                                              }
                                                                            }
                                                                            s__type = 4096;
                                                                            if (s__init_buf___0 == 0) {
                                                                              buf = __VERIFIER_nondet_int();
                                                                              if (buf == 0) {
                                                                                ret = -1;
                                                                                goto end;
                                                                              }
                                                                              if (!tmp___3) {
                                                                                ret = -1;
                                                                                goto end;
                                                                              }
                                                                              s__init_buf___0 = buf;
                                                                            }
                                                                            if (!tmp___4) {
                                                                              ret = -1;
                                                                              goto end;
                                                                            }
                                                                            if (!tmp___5) {
                                                                              ret = -1;
                                                                              goto end;
                                                                            }
                                                                            s__state = 4368;
                                                                            s__ctx__stats__sess_connect++;
                                                                            s__init_num = 0;
                                                                            goto switch_1_break;
                                                                          switch_1_4368:;
                                                                          switch_1_4369:
                                                                            s__shutdown = 0;
                                                                            ret = __VERIFIER_nondet_int();
                                                                            if (blastFlag == 0) {
                                                                              blastFlag = 1;
                                                                            } else {
                                                                              if (blastFlag == 4) {
                                                                                blastFlag = 5;
                                                                              }
                                                                            }
                                                                            if (ret <= 0) {
                                                                              goto end;
                                                                            }
                                                                            s__state = 4384;
                                                                            s__init_num = 0;
                                                                            if (s__bbio != s__wbio) {
                                                                            }
                                                                            goto switch_1_break;
                                                                          switch_1_4384:;
                                                                          switch_1_4385:
                                                                            ret = __VERIFIER_nondet_int();
                                                                            if (blastFlag == 1) {
                                                                              blastFlag = 2;
                                                                            }
                                                                            if (ret <= 0) {
                                                                              goto end;
                                                                            }
                                                                            if (s__hit) {
                                                                              s__state = 4560;
                                                                            } else {
                                                                              s__state = 4400;
                                                                            }
                                                                            s__init_num = 0;
                                                                            goto switch_1_break;
                                                                          switch_1_4400:;
                                                                          switch_1_4401:;
                                                                            {
                                                                              __cil_tmp56 = (unsigned long)s__s3__tmp__new_cipher__algorithms;
                                                                              if (__cil_tmp56 - 256UL) {
                                                                                skip = 1;
                                                                              } else {
                                                                                ret = __VERIFIER_nondet_int();
                                                                                if (blastFlag == 2) {
                                                                                  blastFlag = 3;
                                                                                }
                                                                                if (ret <= 0) {
                                                                                  goto end;
                                                                                }
                                                                              }
                                                                            }
                                                                            s__state = 4416;
                                                                            s__init_num = 0;
                                                                            goto switch_1_break;
                                                                          switch_1_4416:;
                                                                          switch_1_4417:
                                                                            ret = __VERIFIER_nondet_int();
                                                                            if (blastFlag == 3) {
                                                                              blastFlag = 4;
                                                                            }
                                                                            if (ret <= 0) {
                                                                              goto end;
                                                                            }
                                                                            s__state = 4432;
                                                                            s__init_num = 0;
                                                                            if (!tmp___6) {
                                                                              ret = -1;
                                                                              goto end;
                                                                            }
                                                                            goto switch_1_break;
                                                                          switch_1_4432:;
                                                                          switch_1_4433:
                                                                            ret = __VERIFIER_nondet_int();
                                                                            if (blastFlag == 5) {
                                                                              goto ERROR;
                                                                            }
                                                                            if (ret <= 0) {
                                                                              goto end;
                                                                            }
                                                                            s__state = 4448;
                                                                            s__init_num = 0;
                                                                            goto switch_1_break;
                                                                          switch_1_4448:;
                                                                          switch_1_4449:
                                                                            ret = __VERIFIER_nondet_int();
                                                                            if (ret <= 0) {
                                                                              goto end;
                                                                            }
                                                                            if (s__s3__tmp__cert_req) {
                                                                              s__state = 4464;
                                                                            } else {
                                                                              s__state = 4480;
                                                                            }
                                                                            s__init_num = 0;
                                                                            goto switch_1_break;
                                                                          switch_1_4464:;
                                                                          switch_1_4465:;
                                                                          switch_1_4466:;
                                                                          switch_1_4467:
                                                                            ret = __VERIFIER_nondet_int();
                                                                            if (ret <= 0) {
                                                                              goto end;
                                                                            }
                                                                            s__state = 4480;
                                                                            s__init_num = 0;
                                                                            goto switch_1_break;
                                                                          switch_1_4480:;
                                                                          switch_1_4481:
                                                                            ret = __VERIFIER_nondet_int();
                                                                            if (ret <= 0) {
                                                                              goto end;
                                                                            }
                                                                            l = (unsigned long)s__s3__tmp__new_cipher__algorithms;
                                                                            if (s__s3__tmp__cert_req == 1) {
                                                                              s__state = 4496;
                                                                            } else {
                                                                              s__state = 4512;
                                                                              s__s3__change_cipher_spec = 0;
                                                                            }
                                                                            s__init_num = 0;
                                                                            goto switch_1_break;
                                                                          switch_1_4496:;
                                                                          switch_1_4497:
                                                                            ret = __VERIFIER_nondet_int();
                                                                            if (ret <= 0) {
                                                                              goto end;
                                                                            }
                                                                            s__state = 4512;
                                                                            s__init_num = 0;
                                                                            s__s3__change_cipher_spec = 0;
                                                                            goto switch_1_break;
                                                                          switch_1_4512:;
                                                                          switch_1_4513:
                                                                            ret = __VERIFIER_nondet_int();
                                                                            if (ret <= 0) {
                                                                              goto end;
                                                                            }
                                                                            s__state = 4528;
                                                                            s__init_num = 0;
                                                                            s__session__cipher = s__s3__tmp__new_cipher;
                                                                            if (s__s3__tmp__new_compression == 0) {
                                                                              s__session__compress_meth = 0;
                                                                            } else {
                                                                              s__session__compress_meth = s__s3__tmp__new_compression__id;
                                                                            }
                                                                            if (!tmp___7) {
                                                                              ret = -1;
                                                                              goto end;
                                                                            }
                                                                            if (!tmp___8) {
                                                                              ret = -1;
                                                                              goto end;
                                                                            }
                                                                            goto switch_1_break;
                                                                          switch_1_4528:;
                                                                          switch_1_4529:
                                                                            ret = __VERIFIER_nondet_int();
                                                                            if (ret <= 0) {
                                                                              goto end;
                                                                            }
                                                                            s__state = 4352;
                                                                            __cil_tmp57 = (long)s__s3__flags;
                                                                            __cil_tmp58 = __cil_tmp57 + 5;
                                                                            s__s3__flags = (int)__cil_tmp58;
                                                                            if (s__hit) {
                                                                              s__s3__tmp__next_state___0 = 3;
                                                                              {
                                                                                __cil_tmp59 = (long)s__s3__flags;
                                                                                if (__cil_tmp59 - 2L) {
                                                                                  s__state = 3;
                                                                                  __cil_tmp60 = (long)s__s3__flags;
                                                                                  __cil_tmp61 = __cil_tmp60 + 4L;
                                                                                  s__s3__flags = (int)__cil_tmp61;
                                                                                  s__s3__delay_buf_pop_ret = 0;
                                                                                }
                                                                              }
                                                                            } else {
                                                                              s__s3__tmp__next_state___0 = 4560;
                                                                            }
                                                                            s__init_num = 0;
                                                                            goto switch_1_break;
                                                                          switch_1_4560:;
                                                                          switch_1_4561:
                                                                            ret = __VERIFIER_nondet_int();
                                                                            if (ret <= 0) {
                                                                              goto end;
                                                                            }
                                                                            if (s__hit) {
                                                                              s__state = 4512;
                                                                            } else {
                                                                              s__state = 3;
                                                                            }
                                                                            s__init_num = 0;
                                                                            goto switch_1_break;
                                                                          switch_1_4352 : {
                                                                            __cil_tmp62 = (long)num1;
                                                                            if (__cil_tmp62 > 0L) {
                                                                              s__rwstate = 2;
                                                                              num1 = tmp___9;
                                                                              {
                                                                                __cil_tmp63 = (long)num1;
                                                                                if (__cil_tmp63 <= 0L) {
                                                                                  ret = -1;
                                                                                  goto end;
                                                                                }
                                                                              }
                                                                              s__rwstate = 1;
                                                                            }
                                                                          }
                                                                            s__state = s__s3__tmp__next_state___0;
                                                                            goto switch_1_break;
                                                                          switch_1_3:
                                                                            if (s__init_buf___0 != 0) {
                                                                              s__init_buf___0 = 0;
                                                                            }
                                                                            {
                                                                              __cil_tmp64 = (long)s__s3__flags;
                                                                              __cil_tmp65 = __cil_tmp64 - 4L;
                                                                              if (!__cil_tmp65) {
                                                                              }
                                                                            }
                                                                            s__init_num = 0;
                                                                            s__new_session = 0;
                                                                            if (s__hit) {
                                                                              s__ctx__stats__sess_hit++;
                                                                            }
                                                                            ret = 1;
                                                                            s__ctx__stats__sess_connect_good++;
                                                                            if (cb != 0) {
                                                                            }
                                                                            goto end;
                                                                          switch_1_default:
                                                                            ret = -1;
                                                                            goto end;
                                                                          } else {
                                                                          switch_1_break:;
                                                                          }
                                                                        }
                                                                      }
                                                                    }
                                                                  }
                                                                }
                                                              }
                                                            }
                                                          }
                                                        }
                                                      }
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        if (!s__s3__tmp__reuse_message) {
          if (!skip) {
            if (s__debug) {
              ret = __VERIFIER_nondet_int();
              if (ret <= 0) {
                goto end;
              }
            }
            if (cb != 0) {
              if (s__state != state) {
                new_state = s__state;
                s__state = state;
                s__state = new_state;
              }
            }
          }
        }
        skip = 0;
      }
    while_0_break:;
    }
  end:
    s__in_handshake--;
    if (cb != 0) {
    }
    return (ret);
  ERROR:
    __VERIFIER_error();
    return (-1);
  }
}
```