user: What is the c source code of the assembly code below:

```asm
<GetECKeyPrivate>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8d,-0x48(%rbp)
  mov    %r9,-0x58(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  jne    L68
  mov    $0x0,%eax
  call   <EC_KEY_new@plt>
  mov    %rax,-0x38(%rbp)
L68:
  mov    -0x48(%rbp),%ecx
  mov    -0x50(%rbp),%rax
  mov    $0x0,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <BN_bin2bn@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x58(%rbp),%rax
  mov    $0x0,%edx
  mov    0x10(%rbp),%esi
  mov    %rax,%rdi
  call   <BN_bin2bn@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x44(%rbp),%ecx
  mov    -0x40(%rbp),%rax
  mov    $0x0,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <BN_bin2bn@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  je     L611
  cmpq   $0x0,-0x18(%rbp)
  je     L611
  cmpq   $0x0,-0x10(%rbp)
  jne    L575
L611:
  cmpq   $0x0,-0x20(%rbp)
  je     L488
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L488:
  cmpq   $0x0,-0x18(%rbp)
  je     L587
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L587:
  cmpq   $0x0,-0x10(%rbp)
  je     L341
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L341:
  mov    $0xffffffff,%eax
  jmp    L571
L575:
  mov    -0x10(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <EC_KEY_set_private_key@plt>
  test   %eax,%eax
  jne    L394
  cmpq   $0x0,-0x20(%rbp)
  je     L520
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L520:
  cmpq   $0x0,-0x18(%rbp)
  je     L433
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L433:
  cmpq   $0x0,-0x10(%rbp)
  je     L91
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L91:
  mov    $0xfffffffe,%eax
  jmp    L571
L394:
  movq   $0x0,-0x28(%rbp)
  cmpl   $0x0,0x18(%rbp)
  jne    L391
  mov    $0x0,%eax
  call   <sm2_ec_group@plt>
  mov    %rax,-0x28(%rbp)
  jmp    L225
L391:
  cmpl   $0x1,0x18(%rbp)
  jne    L625
  mov    $0x0,%eax
  call   <sm2_ec_group2@plt>
  mov    %rax,-0x28(%rbp)
  jmp    L225
L625:
  cmpq   $0x0,-0x20(%rbp)
  je     L562
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L562:
  cmpq   $0x0,-0x18(%rbp)
  je     L169
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L169:
  cmpq   $0x0,-0x10(%rbp)
  je     L158
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L158:
  mov    $0xfffffff6,%eax
  jmp    L571
L225:
  cmpq   $0x0,-0x28(%rbp)
  jne    L264
  cmpq   $0x0,-0x20(%rbp)
  je     L146
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L146:
  cmpq   $0x0,-0x18(%rbp)
  je     L61
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L61:
  cmpq   $0x0,-0x10(%rbp)
  je     L343
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L343:
  mov    $0xfffffffd,%eax
  jmp    L571
L264:
  mov    -0x28(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <EC_KEY_set_group@plt>
  test   %eax,%eax
  jne    L258
  cmpq   $0x0,-0x20(%rbp)
  je     L2
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L2:
  cmpq   $0x0,-0x18(%rbp)
  je     L309
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L309:
  cmpq   $0x0,-0x10(%rbp)
  je     L292
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L292:
  mov    $0xfffffffc,%eax
  jmp    L571
L258:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <EC_POINT_new@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L174
  cmpq   $0x0,-0x20(%rbp)
  je     L305
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L305:
  cmpq   $0x0,-0x18(%rbp)
  je     L143
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L143:
  cmpq   $0x0,-0x10(%rbp)
  je     L107
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L107:
  mov    $0xfffffffb,%eax
  jmp    L571
L174:
  mov    -0x18(%rbp),%rcx
  mov    -0x20(%rbp),%rdx
  mov    -0x8(%rbp),%rsi
  mov    -0x28(%rbp),%rax
  mov    $0x0,%r8d
  mov    %rax,%rdi
  call   <EC_POINT_set_affine_coordinates_GFp@plt>
  test   %eax,%eax
  jne    L359
  cmpq   $0x0,-0x20(%rbp)
  je     L132
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L132:
  cmpq   $0x0,-0x18(%rbp)
  je     L265
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L265:
  cmpq   $0x0,-0x10(%rbp)
  je     L275
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L275:
  cmpq   $0x0,-0x8(%rbp)
  je     L350
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <EC_POINT_free@plt>
L350:
  mov    $0xfffffffa,%eax
  jmp    L571
L359:
  mov    -0x8(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  mov    $0x0,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <EC_POINT_is_on_curve@plt>
  test   %eax,%eax
  jne    L546
  cmpq   $0x0,-0x20(%rbp)
  je     L393
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L393:
  cmpq   $0x0,-0x18(%rbp)
  je     L259
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L259:
  cmpq   $0x0,-0x10(%rbp)
  je     L405
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L405:
  cmpq   $0x0,-0x8(%rbp)
  je     L618
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <EC_POINT_free@plt>
L618:
  mov    $0xfffffff9,%eax
  jmp    L571
L546:
  mov    -0x8(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <EC_KEY_set_public_key@plt>
  test   %eax,%eax
  jne    L500
  cmpq   $0x0,-0x20(%rbp)
  je     L276
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L276:
  cmpq   $0x0,-0x18(%rbp)
  je     L151
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L151:
  cmpq   $0x0,-0x10(%rbp)
  je     L70
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L70:
  cmpq   $0x0,-0x8(%rbp)
  je     L22
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <EC_POINT_free@plt>
L22:
  mov    $0xfffffff8,%eax
  jmp    L571
L500:
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <EC_KEY_check_key@plt>
  test   %eax,%eax
  jne    L187
  cmpq   $0x0,-0x20(%rbp)
  je     L311
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L311:
  cmpq   $0x0,-0x18(%rbp)
  je     L263
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L263:
  cmpq   $0x0,-0x10(%rbp)
  je     L103
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L103:
  cmpq   $0x0,-0x8(%rbp)
  je     L257
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <EC_POINT_free@plt>
L257:
  mov    $0xfffffff7,%eax
  jmp    L571
L187:
  cmpq   $0x0,-0x20(%rbp)
  je     L583
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L583:
  cmpq   $0x0,-0x18(%rbp)
  je     L41
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L41:
  cmpq   $0x0,-0x10(%rbp)
  je     L171
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
L171:
  cmpq   $0x0,-0x8(%rbp)
  je     L255
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <EC_POINT_free@plt>
L255:
  mov    $0x0,%eax
L571:
  leave
  ret
```

assistant: ```c
int GetECKeyPrivate(EC_KEY *ec_key, unsigned char *privD, int privDlen, unsigned char *pubX, int pubXlen, unsigned char *pubY, int pubYlen, int ctype) {
  if (!ec_key)
    ec_key = EC_KEY_new();
  BIGNUM *pub_key_x = BN_bin2bn(pubX, pubXlen, NULL);
  BIGNUM *pub_key_y = BN_bin2bn(pubY, pubYlen, NULL);
  BIGNUM *priv_key = BN_bin2bn(privD, privDlen, NULL);
  if (!pub_key_x || !pub_key_y || !priv_key) {
    if (pub_key_x)
      BN_free(pub_key_x);
    if (pub_key_y)
      BN_free(pub_key_y);
    if (priv_key)
      BN_free(priv_key);
    return -1;
  }
  if (!EC_KEY_set_private_key(ec_key, priv_key)) {
    if (pub_key_x)
      BN_free(pub_key_x);
    if (pub_key_y)
      BN_free(pub_key_y);
    if (priv_key)
      BN_free(priv_key);
    return -2;
  }
  EC_GROUP *ec_group = NULL;
  if (ctype == 0) {
    ec_group = sm2_ec_group();
  } else if (ctype == 1) {
    ec_group = sm2_ec_group2();
  } else {
    if (pub_key_x)
      BN_free(pub_key_x);
    if (pub_key_y)
      BN_free(pub_key_y);
    if (priv_key)
      BN_free(priv_key);
    return -10;
  }
  if (!ec_group) {
    if (pub_key_x)
      BN_free(pub_key_x);
    if (pub_key_y)
      BN_free(pub_key_y);
    if (priv_key)
      BN_free(priv_key);
    return -3;
  }
  if (!EC_KEY_set_group(ec_key, ec_group)) {
    if (pub_key_x)
      BN_free(pub_key_x);
    if (pub_key_y)
      BN_free(pub_key_y);
    if (priv_key)
      BN_free(priv_key);
    return -4;
  }
  EC_POINT *pub_key = EC_POINT_new(ec_group);
  if (!pub_key) {
    if (pub_key_x)
      BN_free(pub_key_x);
    if (pub_key_y)
      BN_free(pub_key_y);
    if (priv_key)
      BN_free(priv_key);
    return -5;
  }
  if (!EC_POINT_set_affine_coordinates_GFp(ec_group, pub_key, pub_key_x, pub_key_y, NULL)) {
    if (pub_key_x)
      BN_free(pub_key_x);
    if (pub_key_y)
      BN_free(pub_key_y);
    if (priv_key)
      BN_free(priv_key);
    if (pub_key)
      EC_POINT_free(pub_key);
    return -6;
  }
  if (!EC_POINT_is_on_curve(ec_group, pub_key, NULL)) {
    if (pub_key_x)
      BN_free(pub_key_x);
    if (pub_key_y)
      BN_free(pub_key_y);
    if (priv_key)
      BN_free(priv_key);
    if (pub_key)
      EC_POINT_free(pub_key);
    return -7;
  }
  if (!EC_KEY_set_public_key(ec_key, pub_key)) {
    if (pub_key_x)
      BN_free(pub_key_x);
    if (pub_key_y)
      BN_free(pub_key_y);
    if (priv_key)
      BN_free(priv_key);
    if (pub_key)
      EC_POINT_free(pub_key);
    return -8;
  }
  if (!EC_KEY_check_key(ec_key)) {
    if (pub_key_x)
      BN_free(pub_key_x);
    if (pub_key_y)
      BN_free(pub_key_y);
    if (priv_key)
      BN_free(priv_key);
    if (pub_key)
      EC_POINT_free(pub_key);
    return -9;
  }
  if (pub_key_x)
    BN_free(pub_key_x);
  if (pub_key_y)
    BN_free(pub_key_y);
  if (priv_key)
    BN_free(priv_key);
  if (pub_key)
    EC_POINT_free(pub_key);
  return 0;
}
```