#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef scalar_t__ point_conversion_form_t;
typedef int /*<<< orphan*/ EC_POINT;
typedef int /*<<< orphan*/ EC_GROUP;
typedef int /*<<< orphan*/ BN_CTX;
typedef int /*<<< orphan*/ BIO;
typedef int /*<<< orphan*/ BIGNUM;

/* Variables and functions */
int /*<<< orphan*/ ASN1_bn_print(int /*<<< orphan*/ *, char const *,
                                 int /*<<< orphan*/ *, unsigned char *, int);
int /*<<< orphan*/ BIO_indent(int /*<<< orphan*/ *, int, int);
scalar_t__ BIO_printf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ BN_CTX_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *BN_CTX_new();
int /*<<< orphan*/ BN_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *BN_new();
scalar_t__ BN_num_bytes(int /*<<< orphan*/ *);
int /*<<< orphan*/ EC_F_ECPKPARAMETERS_PRINT;
int /*<<< orphan*/ *EC_GROUP_get0_generator(int /*<<< orphan*/ const *);
unsigned char *EC_GROUP_get0_seed(int /*<<< orphan*/ const *);
scalar_t__ EC_GROUP_get_asn1_flag(int /*<<< orphan*/ const *);
int EC_GROUP_get_basis_type(int /*<<< orphan*/ const *);
int /*<<< orphan*/ EC_GROUP_get_cofactor(int /*<<< orphan*/ const *,
                                         int /*<<< orphan*/ *,
                                         int /*<<< orphan*/ *);
int /*<<< orphan*/ EC_GROUP_get_curve_GF2m(int /*<<< orphan*/ const *,
                                           int /*<<< orphan*/ *,
                                           int /*<<< orphan*/ *,
                                           int /*<<< orphan*/ *,
                                           int /*<<< orphan*/ *);
int /*<<< orphan*/ EC_GROUP_get_curve_GFp(int /*<<< orphan*/ const *,
                                          int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ *,
                                          int /*<<< orphan*/ *);
int EC_GROUP_get_curve_name(int /*<<< orphan*/ const *);
int /*<<< orphan*/ EC_GROUP_get_order(int /*<<< orphan*/ const *,
                                      int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
scalar_t__ EC_GROUP_get_point_conversion_form(int /*<<< orphan*/ const *);
size_t EC_GROUP_get_seed_len(int /*<<< orphan*/ const *);
int /*<<< orphan*/ EC_GROUP_method_of(int /*<<< orphan*/ const *);
int EC_METHOD_get_field_type(int /*<<< orphan*/);
int /*<<< orphan*/ *EC_POINT_point2bn(int /*<<< orphan*/ const *,
                                      int /*<<< orphan*/ const *, scalar_t__,
                                      int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
int /*<<< orphan*/ ECerr(int /*<<< orphan*/, int);
int ERR_R_BIO_LIB;
int ERR_R_EC_LIB;
int ERR_R_MALLOC_FAILURE;
int ERR_R_PASSED_NULL_PARAMETER;
int NID_X9_62_characteristic_two_field;
int /*<<< orphan*/ OBJ_nid2sn(int);
scalar_t__ POINT_CONVERSION_COMPRESSED;
scalar_t__ POINT_CONVERSION_UNCOMPRESSED;
int /*<<< orphan*/ free(unsigned char *);
unsigned char *malloc(size_t);
int /*<<< orphan*/ print_bin(int /*<<< orphan*/ *, char *,
                             unsigned char const *, size_t, int);
int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) {
  unsigned char *buffer = NULL;
  size_t buf_len = 0, i;
  int ret = 0, reason = ERR_R_BIO_LIB;
  BN_CTX *ctx = NULL;
  const EC_POINT *point = NULL;
  BIGNUM *p = NULL, *a = NULL, *b = NULL, *gen = NULL, *order = NULL,
         *cofactor = NULL;
  const unsigned char *seed;
  size_t seed_len = 0;
  static const char *gen_compressed = "Generator (compressed):";
  static const char *gen_uncompressed = "Generator (uncompressed):";
  static const char *gen_hybrid = "Generator (hybrid):";
  if (!x) {
    reason = ERR_R_PASSED_NULL_PARAMETER;
    goto err;
  }
  ctx = BN_CTX_new();
  if (ctx == NULL) {
    reason = ERR_R_MALLOC_FAILURE;
    goto err;
  }
  if (EC_GROUP_get_asn1_flag(x)) {
    int nid;
    if (!BIO_indent(bp, off, 128))
      goto err;
    nid = EC_GROUP_get_curve_name(x);
    if (nid == 0)
      goto err;
    if (BIO_printf(bp, "ASN1 OID: %s", OBJ_nid2sn(nid)) <= 0)
      goto err;
    if (BIO_printf(bp, "\n") <= 0)
      goto err;
  } else {
    int is_char_two = 0;
    point_conversion_form_t form;
    int tmp_nid = EC_METHOD_get_field_type(EC_GROUP_method_of(x));
    if (tmp_nid == NID_X9_62_characteristic_two_field)
      is_char_two = 1;
    if ((p = BN_new()) == NULL || (a = BN_new()) == NULL ||
        (b = BN_new()) == NULL || (order = BN_new()) == NULL ||
        (cofactor = BN_new()) == NULL) {
      reason = ERR_R_MALLOC_FAILURE;
      goto err;
    }
    if (is_char_two) {
      if (!EC_GROUP_get_curve_GF2m(x, p, a, b, ctx)) {
        reason = ERR_R_EC_LIB;
        goto err;
      }
    } else {
      if (!EC_GROUP_get_curve_GFp(x, p, a, b, ctx)) {
        reason = ERR_R_EC_LIB;
        goto err;
      }
    }
    if ((point = EC_GROUP_get0_generator(x)) == NULL) {
      reason = ERR_R_EC_LIB;
      goto err;
    }
    if (!EC_GROUP_get_order(x, order, NULL) ||
        !EC_GROUP_get_cofactor(x, cofactor, NULL)) {
      reason = ERR_R_EC_LIB;
      goto err;
    }
    form = EC_GROUP_get_point_conversion_form(x);
    if ((gen = EC_POINT_point2bn(x, point, form, NULL, ctx)) == NULL) {
      reason = ERR_R_EC_LIB;
      goto err;
    }
    buf_len = (size_t)BN_num_bytes(p);
    if (buf_len < (i = (size_t)BN_num_bytes(a)))
      buf_len = i;
    if (buf_len < (i = (size_t)BN_num_bytes(b)))
      buf_len = i;
    if (buf_len < (i = (size_t)BN_num_bytes(gen)))
      buf_len = i;
    if (buf_len < (i = (size_t)BN_num_bytes(order)))
      buf_len = i;
    if (buf_len < (i = (size_t)BN_num_bytes(cofactor)))
      buf_len = i;
    if ((seed = EC_GROUP_get0_seed(x)) != NULL)
      seed_len = EC_GROUP_get_seed_len(x);
    buf_len += 10;
    if ((buffer = malloc(buf_len)) == NULL) {
      reason = ERR_R_MALLOC_FAILURE;
      goto err;
    }
    if (!BIO_indent(bp, off, 128))
      goto err;
    if (BIO_printf(bp, "Field Type: %s\n", OBJ_nid2sn(tmp_nid)) <= 0)
      goto err;
    if (is_char_two) {
      int basis_type = EC_GROUP_get_basis_type(x);
      if (basis_type == 0)
        goto err;
      if (!BIO_indent(bp, off, 128))
        goto err;
      if (BIO_printf(bp, "Basis Type: %s\n", OBJ_nid2sn(basis_type)) <= 0)
        goto err;
      if ((p != NULL) && !ASN1_bn_print(bp, "Polynomial:", p, buffer, off))
        goto err;
    } else {
      if ((p != NULL) && !ASN1_bn_print(bp, "Prime:", p, buffer, off))
        goto err;
    }
    if ((a != NULL) && !ASN1_bn_print(bp, "A:   ", a, buffer, off))
      goto err;
    if ((b != NULL) && !ASN1_bn_print(bp, "B:   ", b, buffer, off))
      goto err;
    if (form == POINT_CONVERSION_COMPRESSED) {
      if ((gen != NULL) && !ASN1_bn_print(bp, gen_compressed, gen, buffer, off))
        goto err;
    } else if (form == POINT_CONVERSION_UNCOMPRESSED) {
      if ((gen != NULL) &&
          !ASN1_bn_print(bp, gen_uncompressed, gen, buffer, off))
        goto err;
    } else {
      if ((gen != NULL) && !ASN1_bn_print(bp, gen_hybrid, gen, buffer, off))
        goto err;
    }
    if ((order != NULL) && !ASN1_bn_print(bp, "Order: ", order, buffer, off))
      goto err;
    if ((cofactor != NULL) &&
        !ASN1_bn_print(bp, "Cofactor: ", cofactor, buffer, off))
      goto err;
    if (seed && !print_bin(bp, "Seed:", seed, seed_len, off))
      goto err;
  }
  ret = 1;
err:
  if (!ret)
    ECerr(EC_F_ECPKPARAMETERS_PRINT, reason);
  if (p)
    BN_free(p);
  if (a)
    BN_free(a);
  if (b)
    BN_free(b);
  if (gen)
    BN_free(gen);
  if (order)
    BN_free(order);
  if (cofactor)
    BN_free(cofactor);
  if (ctx)
    BN_CTX_free(ctx);
  free(buffer);
  return (ret);
}


x86 assembly (clang, -O0):
<ECPKParameters_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
mov    0x2cd4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
movq   $0x0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
movq   $0x0,-0x60(%rbp)
movq   $0x0,-0x68(%rbp)
movq   $0x0,-0x70(%rbp)
movq   $0x0,-0x78(%rbp)
movq   $0x0,-0x88(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1350 <ECPKParameters_print+0xa0>
mov    0x2c7a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
jmp    1ad2 <ECPKParameters_print+0x822>
mov    $0x0,%al
call   1130 <BN_CTX_new@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    1377 <ECPKParameters_print+0xc7>
mov    0x2c73(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
jmp    1ad2 <ECPKParameters_print+0x822>
mov    -0x10(%rbp),%rdi
call   10a0 <EC_GROUP_get_asn1_flag@plt>
cmp    $0x0,%rax
je     142c <ECPKParameters_print+0x17c>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x80,%edx
call   1070 <BIO_indent@plt>
cmp    $0x0,%eax
jne    13a9 <ECPKParameters_print+0xf9>
jmp    1ad2 <ECPKParameters_print+0x822>
mov    -0x10(%rbp),%rdi
call   1190 <EC_GROUP_get_curve_name@plt>
mov    %eax,-0x8c(%rbp)
cmpl   $0x0,-0x8c(%rbp)
jne    13ca <ECPKParameters_print+0x11a>
jmp    1ad2 <ECPKParameters_print+0x822>
mov    -0x8(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x8c(%rbp),%edi
call   10b0 <OBJ_nid2sn@plt>
mov    -0xa8(%rbp),%rdi
mov    %eax,%edx
lea    0xc56(%rip),%rsi
mov    $0x0,%al
call   10c0 <BIO_printf@plt>
cmp    $0x0,%rax
jg     1406 <ECPKParameters_print+0x156>
jmp    1ad2 <ECPKParameters_print+0x822>
mov    -0x8(%rbp),%rdi
lea    0xc50(%rip),%rsi
mov    $0x0,%al
call   10c0 <BIO_printf@plt>
cmp    $0x0,%rax
jg     1427 <ECPKParameters_print+0x177>
jmp    1ad2 <ECPKParameters_print+0x822>
jmp    1acb <ECPKParameters_print+0x81b>
movl   $0x0,-0x90(%rbp)
mov    -0x10(%rbp),%rdi
call   1150 <EC_GROUP_method_of@plt>
mov    %eax,%edi
call   1160 <EC_METHOD_get_field_type@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x9c(%rbp),%eax
mov    0x2b57(%rip),%rcx
cmp    (%rcx),%eax
jne    146b <ECPKParameters_print+0x1bb>
movl   $0x1,-0x90(%rbp)
mov    $0x0,%al
call   1090 <BN_new@plt>
mov    %rax,-0x50(%rbp)
cmp    $0x0,%rax
je     14d4 <ECPKParameters_print+0x224>
mov    $0x0,%al
call   1090 <BN_new@plt>
mov    %rax,-0x58(%rbp)
cmp    $0x0,%rax
je     14d4 <ECPKParameters_print+0x224>
mov    $0x0,%al
call   1090 <BN_new@plt>
mov    %rax,-0x60(%rbp)
cmp    $0x0,%rax
je     14d4 <ECPKParameters_print+0x224>
mov    $0x0,%al
call   1090 <BN_new@plt>
mov    %rax,-0x70(%rbp)
cmp    $0x0,%rax
je     14d4 <ECPKParameters_print+0x224>
mov    $0x0,%al
call   1090 <BN_new@plt>
mov    %rax,-0x78(%rbp)
cmp    $0x0,%rax
jne    14e5 <ECPKParameters_print+0x235>
mov    0x2b05(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
jmp    1ad2 <ECPKParameters_print+0x822>
cmpl   $0x0,-0x90(%rbp)
je     152a <ECPKParameters_print+0x27a>
mov    -0x10(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x60(%rbp),%rcx
mov    -0x40(%rbp),%r8
call   11d0 <EC_GROUP_get_curve_GF2m@plt>
cmp    $0x0,%eax
jne    1525 <ECPKParameters_print+0x275>
mov    0x2abd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
jmp    1ad2 <ECPKParameters_print+0x822>
jmp    1562 <ECPKParameters_print+0x2b2>
mov    -0x10(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x58(%rbp),%rdx
mov    -0x60(%rbp),%rcx
mov    -0x40(%rbp),%r8
call   10d0 <EC_GROUP_get_curve_GFp@plt>
cmp    $0x0,%eax
jne    155d <ECPKParameters_print+0x2ad>
mov    0x2a85(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
jmp    1ad2 <ECPKParameters_print+0x822>
jmp    1562 <ECPKParameters_print+0x2b2>
mov    -0x10(%rbp),%rdi
call   11c0 <EC_GROUP_get0_generator@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
jne    158a <ECPKParameters_print+0x2da>
mov    0x2a58(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
jmp    1ad2 <ECPKParameters_print+0x822>
mov    -0x10(%rbp),%rdi
mov    -0x70(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   10f0 <EC_GROUP_get_order@plt>
cmp    $0x0,%eax
je     15be <ECPKParameters_print+0x30e>
mov    -0x10(%rbp),%rdi
mov    -0x78(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <EC_GROUP_get_cofactor@plt>
cmp    $0x0,%eax
jne    15cf <ECPKParameters_print+0x31f>
mov    0x2a13(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
jmp    1ad2 <ECPKParameters_print+0x822>
mov    -0x10(%rbp),%rdi
call   1120 <EC_GROUP_get_point_conversion_form@plt>
mov    %rax,-0x98(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x98(%rbp),%rdx
mov    -0x40(%rbp),%r8
xor    %eax,%eax
mov    %eax,%ecx
call   1050 <EC_POINT_point2bn@plt>
mov    %rax,-0x68(%rbp)
cmp    $0x0,%rax
jne    161a <ECPKParameters_print+0x36a>
mov    0x29c8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
jmp    1ad2 <ECPKParameters_print+0x822>
mov    -0x50(%rbp),%rdi
call   1170 <BN_num_bytes@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x58(%rbp),%rdi
call   1170 <BN_num_bytes@plt>
mov    %rax,%rcx
mov    -0xb0(%rbp),%rax
mov    %rcx,-0x30(%rbp)
cmp    %rcx,%rax
jae    165a <ECPKParameters_print+0x3aa>
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x60(%rbp),%rdi
call   1170 <BN_num_bytes@plt>
mov    %rax,%rcx
mov    -0xb8(%rbp),%rax
mov    %rcx,-0x30(%rbp)
cmp    %rcx,%rax
jae    168d <ECPKParameters_print+0x3dd>
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x68(%rbp),%rdi
call   1170 <BN_num_bytes@plt>
mov    %rax,%rcx
mov    -0xc0(%rbp),%rax
mov    %rcx,-0x30(%rbp)
cmp    %rcx,%rax
jae    16c0 <ECPKParameters_print+0x410>
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0xc8(%rbp)
mov    -0x70(%rbp),%rdi
call   1170 <BN_num_bytes@plt>
mov    %rax,%rcx
mov    -0xc8(%rbp),%rax
mov    %rcx,-0x30(%rbp)
cmp    %rcx,%rax
jae    16f3 <ECPKParameters_print+0x443>
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0x78(%rbp),%rdi
call   1170 <BN_num_bytes@plt>
mov    %rax,%rcx
mov    -0xd0(%rbp),%rax
mov    %rcx,-0x30(%rbp)
cmp    %rcx,%rax
jae    1726 <ECPKParameters_print+0x476>
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1110 <EC_GROUP_get0_seed@plt>
mov    %rax,-0x80(%rbp)
cmp    $0x0,%rax
je     174d <ECPKParameters_print+0x49d>
mov    -0x10(%rbp),%rdi
call   1060 <EC_GROUP_get_seed_len@plt>
mov    %rax,-0x88(%rbp)
mov    -0x28(%rbp),%rax
add    $0xa,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1140 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1781 <ECPKParameters_print+0x4d1>
mov    0x2869(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
jmp    1ad2 <ECPKParameters_print+0x822>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x80,%edx
call   1070 <BIO_indent@plt>
cmp    $0x0,%eax
jne    17a0 <ECPKParameters_print+0x4f0>
jmp    1ad2 <ECPKParameters_print+0x822>
mov    -0x8(%rbp),%rax
mov    %rax,-0xd8(%rbp)
mov    -0x9c(%rbp),%edi
call   10b0 <OBJ_nid2sn@plt>
mov    -0xd8(%rbp),%rdi
mov    %eax,%edx
lea    0x88d(%rip),%rsi
mov    $0x0,%al
call   10c0 <BIO_printf@plt>
cmp    $0x0,%rax
jg     17dc <ECPKParameters_print+0x52c>
jmp    1ad2 <ECPKParameters_print+0x822>
cmpl   $0x0,-0x90(%rbp)
je     189f <ECPKParameters_print+0x5ef>
mov    -0x10(%rbp),%rdi
call   1080 <EC_GROUP_get_basis_type@plt>
mov    %eax,-0xa0(%rbp)
cmpl   $0x0,-0xa0(%rbp)
jne    180a <ECPKParameters_print+0x55a>
jmp    1ad2 <ECPKParameters_print+0x822>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x80,%edx
call   1070 <BIO_indent@plt>
cmp    $0x0,%eax
jne    1829 <ECPKParameters_print+0x579>
jmp    1ad2 <ECPKParameters_print+0x822>
mov    -0x8(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    -0xa0(%rbp),%edi
call   10b0 <OBJ_nid2sn@plt>
mov    -0xe0(%rbp),%rdi
mov    %eax,%edx
lea    0x814(%rip),%rsi
mov    $0x0,%al
call   10c0 <BIO_printf@plt>
cmp    $0x0,%rax
jg     1865 <ECPKParameters_print+0x5b5>
jmp    1ad2 <ECPKParameters_print+0x822>
cmpq   $0x0,-0x50(%rbp)
je     189a <ECPKParameters_print+0x5ea>
mov    -0x8(%rbp),%rdi
mov    -0x50(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0x7ec(%rip),%rsi
call   11b0 <ASN1_bn_print@plt>
cmp    $0x0,%eax
jne    189a <ECPKParameters_print+0x5ea>
jmp    1ad2 <ECPKParameters_print+0x822>
jmp    18d9 <ECPKParameters_print+0x629>
cmpq   $0x0,-0x50(%rbp)
je     18d4 <ECPKParameters_print+0x624>
mov    -0x8(%rbp),%rdi
mov    -0x50(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0x7be(%rip),%rsi
call   11b0 <ASN1_bn_print@plt>
cmp    $0x0,%eax
jne    18d4 <ECPKParameters_print+0x624>
jmp    1ad2 <ECPKParameters_print+0x822>
jmp    18d9 <ECPKParameters_print+0x629>
cmpq   $0x0,-0x58(%rbp)
je     190e <ECPKParameters_print+0x65e>
mov    -0x8(%rbp),%rdi
mov    -0x58(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0x78b(%rip),%rsi
call   11b0 <ASN1_bn_print@plt>
cmp    $0x0,%eax
jne    190e <ECPKParameters_print+0x65e>
jmp    1ad2 <ECPKParameters_print+0x822>
cmpq   $0x0,-0x60(%rbp)
je     1943 <ECPKParameters_print+0x693>
mov    -0x8(%rbp),%rdi
mov    -0x60(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0x75c(%rip),%rsi
call   11b0 <ASN1_bn_print@plt>
cmp    $0x0,%eax
jne    1943 <ECPKParameters_print+0x693>
jmp    1ad2 <ECPKParameters_print+0x822>
mov    -0x98(%rbp),%rax
mov    0x2697(%rip),%rcx
cmp    (%rcx),%rax
jne    1994 <ECPKParameters_print+0x6e4>
cmpq   $0x0,-0x68(%rbp)
je     198f <ECPKParameters_print+0x6df>
mov    -0x8(%rbp),%rdi
mov    0x2788(%rip),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%r8d
call   11b0 <ASN1_bn_print@plt>
cmp    $0x0,%eax
jne    198f <ECPKParameters_print+0x6df>
jmp    1ad2 <ECPKParameters_print+0x822>
jmp    1a24 <ECPKParameters_print+0x774>
mov    -0x98(%rbp),%rax
mov    0x2626(%rip),%rcx
cmp    (%rcx),%rax
jne    19e5 <ECPKParameters_print+0x735>
cmpq   $0x0,-0x68(%rbp)
je     19e0 <ECPKParameters_print+0x730>
mov    -0x8(%rbp),%rdi
mov    0x273f(%rip),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%r8d
call   11b0 <ASN1_bn_print@plt>
cmp    $0x0,%eax
jne    19e0 <ECPKParameters_print+0x730>
jmp    1ad2 <ECPKParameters_print+0x822>
jmp    1a1f <ECPKParameters_print+0x76f>
cmpq   $0x0,-0x68(%rbp)
je     1a1a <ECPKParameters_print+0x76a>
mov    -0x8(%rbp),%rdi
mov    0x270d(%rip),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%r8d
call   11b0 <ASN1_bn_print@plt>
cmp    $0x0,%eax
jne    1a1a <ECPKParameters_print+0x76a>
jmp    1ad2 <ECPKParameters_print+0x822>
jmp    1a1f <ECPKParameters_print+0x76f>
jmp    1a24 <ECPKParameters_print+0x774>
cmpq   $0x0,-0x70(%rbp)
je     1a59 <ECPKParameters_print+0x7a9>
mov    -0x8(%rbp),%rdi
mov    -0x70(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0x64c(%rip),%rsi
call   11b0 <ASN1_bn_print@plt>
cmp    $0x0,%eax
jne    1a59 <ECPKParameters_print+0x7a9>
jmp    1ad2 <ECPKParameters_print+0x822>
cmpq   $0x0,-0x78(%rbp)
je     1a8e <ECPKParameters_print+0x7de>
mov    -0x8(%rbp),%rdi
mov    -0x78(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0x61f(%rip),%rsi
call   11b0 <ASN1_bn_print@plt>
cmp    $0x0,%eax
jne    1a8e <ECPKParameters_print+0x7de>
jmp    1ad2 <ECPKParameters_print+0x822>
cmpq   $0x0,-0x80(%rbp)
je     1ac6 <ECPKParameters_print+0x816>
mov    -0x8(%rbp),%rdi
mov    -0x80(%rbp),%rdx
mov    -0x88(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0x5f2(%rip),%rsi
call   1180 <print_bin@plt>
cmp    $0x0,%eax
jne    1ac6 <ECPKParameters_print+0x816>
jmp    1ad2 <ECPKParameters_print+0x822>
jmp    1acb <ECPKParameters_print+0x81b>
movl   $0x1,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jne    1aed <ECPKParameters_print+0x83d>
mov    0x24c5(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%esi
call   11a0 <ECerr@plt>
cmpq   $0x0,-0x50(%rbp)
je     1b01 <ECPKParameters_print+0x851>
mov    -0x50(%rbp),%rdi
call   1100 <BN_free@plt>
cmpq   $0x0,-0x58(%rbp)
je     1b15 <ECPKParameters_print+0x865>
mov    -0x58(%rbp),%rdi
call   1100 <BN_free@plt>
cmpq   $0x0,-0x60(%rbp)
je     1b29 <ECPKParameters_print+0x879>
mov    -0x60(%rbp),%rdi
call   1100 <BN_free@plt>
cmpq   $0x0,-0x68(%rbp)
je     1b3d <ECPKParameters_print+0x88d>
mov    -0x68(%rbp),%rdi
call   1100 <BN_free@plt>
cmpq   $0x0,-0x70(%rbp)
je     1b51 <ECPKParameters_print+0x8a1>
mov    -0x70(%rbp),%rdi
call   1100 <BN_free@plt>
cmpq   $0x0,-0x78(%rbp)
je     1b65 <ECPKParameters_print+0x8b5>
mov    -0x78(%rbp),%rdi
call   1100 <BN_free@plt>
cmpq   $0x0,-0x40(%rbp)
je     1b79 <ECPKParameters_print+0x8c9>
mov    -0x40(%rbp),%rdi
call   10e0 <BN_CTX_free@plt>
mov    -0x20(%rbp),%rdi
call   1040 <free@plt>
mov    -0x34(%rbp),%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECPKParameters_print>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
test   %rsi,%rsi
je     1359 <ECPKParameters_print+0xa9>
mov    %edx,%ebp
mov    %rsi,%r12
mov    %rdi,%r14
mov    0x2ce2(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1130 <BN_CTX_new@plt>
test   %rax,%rax
je     1362 <ECPKParameters_print+0xb2>
mov    %rax,%r15
mov    %r12,%rdi
call   10a0 <EC_GROUP_get_asn1_flag@plt>
test   %rax,%rax
je     139b <ECPKParameters_print+0xeb>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x80,%edx
call   1070 <BIO_indent@plt>
test   %eax,%eax
je     1383 <ECPKParameters_print+0xd3>
mov    %r12,%rdi
call   1190 <EC_GROUP_get_curve_name@plt>
test   %eax,%eax
je     1383 <ECPKParameters_print+0xd3>
mov    %eax,%edi
call   10b0 <OBJ_nid2sn@plt>
lea    0xd21(%rip),%rsi
mov    %r14,%rdi
mov    %eax,%edx
xor    %eax,%eax
call   10c0 <BIO_printf@plt>
test   %rax,%rax
jle    1383 <ECPKParameters_print+0xd3>
lea    0xd24(%rip),%rsi
xor    %ebp,%ebp
mov    %r14,%rdi
xor    %eax,%eax
call   10c0 <BIO_printf@plt>
test   %rax,%rax
jle    1383 <ECPKParameters_print+0xd3>
mov    $0x1,%r13d
jmp    14c6 <ECPKParameters_print+0x216>
mov    0x2c60(%rip),%rax
jmp    1369 <ECPKParameters_print+0xb9>
mov    0x2c77(%rip),%rax
mov    (%rax),%esi
mov    0x2c36(%rip),%rax
mov    (%rax),%edi
call   11a0 <ECerr@plt>
xor    %r13d,%r13d
xor    %ebp,%ebp
jmp    14ce <ECPKParameters_print+0x21e>
mov    0x2c1e(%rip),%rax
mov    (%rax),%edi
mov    %ebx,%esi
call   11a0 <ECerr@plt>
xor    %r13d,%r13d
jmp    14c4 <ECPKParameters_print+0x214>
mov    %ebx,0xc(%rsp)
mov    %r12,%rdi
call   1150 <EC_GROUP_method_of@plt>
mov    %eax,%edi
call   1160 <EC_METHOD_get_field_type@plt>
mov    %eax,%ebx
mov    0x2bf9(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x44(%rsp)
xor    %r13d,%r13d
xor    %eax,%eax
call   1090 <BN_new@plt>
test   %rax,%rax
je     14ad <ECPKParameters_print+0x1fd>
mov    %rax,0x30(%rsp)
xor    %r13d,%r13d
xor    %eax,%eax
call   1090 <BN_new@plt>
mov    %rax,0x38(%rsp)
test   %rax,%rax
mov    %r15,0x60(%rsp)
je     1454 <ECPKParameters_print+0x1a4>
xor    %eax,%eax
call   1090 <BN_new@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     1454 <ECPKParameters_print+0x1a4>
xor    %eax,%eax
call   1090 <BN_new@plt>
mov    %rax,0x18(%rsp)
test   %rax,%rax
je     14e8 <ECPKParameters_print+0x238>
xor    %eax,%eax
call   1090 <BN_new@plt>
test   %rax,%rax
je     14f5 <ECPKParameters_print+0x245>
mov    %rax,0x48(%rsp)
mov    %ebx,%eax
cmp    0x44(%rsp),%ebx
jne    1504 <ECPKParameters_print+0x254>
mov    %r12,%rdi
mov    0x30(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    0x10(%rsp),%rcx
mov    %r15,%r8
call   11d0 <EC_GROUP_get_curve_GF2m@plt>
jmp    151e <ECPKParameters_print+0x26e>
xor    %r12d,%r12d
xor    %r15d,%r15d
mov    0x2b7f(%rip),%rax
mov    (%rax),%esi
mov    0x2b3e(%rip),%rax
mov    (%rax),%edi
call   11a0 <ECerr@plt>
mov    0x30(%rsp),%rdi
call   1100 <BN_free@plt>
mov    $0x0,%edx
mov    $0x0,%eax
mov    $0x0,%ecx
mov    $0x0,%ebp
mov    $0x0,%r14d
mov    $0x0,%ebx
mov    0x38(%rsp),%rdi
test   %rdi,%rdi
jne    166f <ECPKParameters_print+0x3bf>
jmp    167d <ECPKParameters_print+0x3cd>
mov    0x2b2c(%rip),%rax
mov    (%rax),%esi
mov    0x2aeb(%rip),%rax
mov    (%rax),%edi
call   11a0 <ECerr@plt>
xor    %ebp,%ebp
mov    %r15,%rdi
call   10e0 <BN_CTX_free@plt>
mov    %rbp,%rdi
call   1040 <free@plt>
mov    %r13d,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r15d,%r15d
mov    0x10(%rsp),%r12
jmp    145a <ECPKParameters_print+0x1aa>
mov    0x18(%rsp),%r15
mov    0x10(%rsp),%r12
jmp    145a <ECPKParameters_print+0x1aa>
mov    %r12,%rdi
mov    0x30(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    0x10(%rsp),%rcx
mov    %r15,%r8
call   10d0 <EC_GROUP_get_curve_GFp@plt>
test   %eax,%eax
je     161f <ECPKParameters_print+0x36f>
mov    %r12,%rdi
call   11c0 <EC_GROUP_get0_generator@plt>
test   %rax,%rax
je     161f <ECPKParameters_print+0x36f>
mov    %rax,%r15
mov    %r12,%rdi
mov    0x18(%rsp),%rsi
xor    %edx,%edx
call   10f0 <EC_GROUP_get_order@plt>
test   %eax,%eax
je     161f <ECPKParameters_print+0x36f>
mov    %r12,%rdi
mov    0x48(%rsp),%rsi
xor    %edx,%edx
call   1030 <EC_GROUP_get_cofactor@plt>
test   %eax,%eax
je     161f <ECPKParameters_print+0x36f>
mov    %r12,%rdi
call   1120 <EC_GROUP_get_point_conversion_form@plt>
mov    %rax,%r13
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rax,%rdx
xor    %ecx,%ecx
mov    0x60(%rsp),%r8
call   1050 <EC_POINT_point2bn@plt>
test   %rax,%rax
je     161f <ECPKParameters_print+0x36f>
mov    %r13,0x58(%rsp)
mov    0x30(%rsp),%rdi
mov    %rax,%r13
call   1170 <BN_num_bytes@plt>
mov    %rax,%r15
mov    0x38(%rsp),%rdi
call   1170 <BN_num_bytes@plt>
cmp    %rax,%r15
cmovb  %rax,%r15
mov    0x10(%rsp),%rdi
call   1170 <BN_num_bytes@plt>
cmp    %rax,%r15
cmovb  %rax,%r15
mov    %r13,0x28(%rsp)
mov    %r13,%rdi
call   1170 <BN_num_bytes@plt>
cmp    %rax,%r15
cmovb  %rax,%r15
mov    0x18(%rsp),%rdi
call   1170 <BN_num_bytes@plt>
cmp    %rax,%r15
cmovb  %rax,%r15
mov    0x48(%rsp),%rdi
call   1170 <BN_num_bytes@plt>
cmp    %rax,%r15
cmovb  %rax,%r15
mov    %r12,%rdi
call   1110 <EC_GROUP_get0_seed@plt>
mov    %rax,%r13
test   %rax,%rax
je     16bf <ECPKParameters_print+0x40f>
mov    %r12,%rdi
call   1060 <EC_GROUP_get_seed_len@plt>
jmp    16c1 <ECPKParameters_print+0x411>
mov    0x29b2(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %rax,0x28(%rsp)
xor    %eax,%eax
mov    %rax,0x20(%rsp)
mov    0x18(%rsp),%r15
mov    0x10(%rsp),%r12
mov    0x2961(%rip),%rax
mov    (%rax),%edi
call   11a0 <ECerr@plt>
xor    %r13d,%r13d
mov    0x30(%rsp),%rdi
call   1100 <BN_free@plt>
mov    0x38(%rsp),%rdi
mov    0x48(%rsp),%rax
mov    0x28(%rsp),%rcx
mov    0x20(%rsp),%rdx
mov    %rax,%r14
mov    %rcx,%rbx
mov    %rdx,%rbp
call   1100 <BN_free@plt>
test   %r12,%r12
je     168a <ECPKParameters_print+0x3da>
mov    %r12,%rdi
call   1100 <BN_free@plt>
test   %rbx,%rbx
je     1697 <ECPKParameters_print+0x3e7>
mov    %rbx,%rdi
call   1100 <BN_free@plt>
test   %r15,%r15
je     16a4 <ECPKParameters_print+0x3f4>
mov    %r15,%rdi
call   1100 <BN_free@plt>
test   %r14,%r14
mov    0x60(%rsp),%r15
je     14c6 <ECPKParameters_print+0x216>
mov    %r14,%rdi
call   1100 <BN_free@plt>
jmp    14c6 <ECPKParameters_print+0x216>
xor    %eax,%eax
mov    %rax,0x50(%rsp)
add    $0xa,%r15
mov    %r15,%rdi
call   1140 <malloc@plt>
test   %rax,%rax
je     1775 <ECPKParameters_print+0x4c5>
mov    %rax,0x20(%rsp)
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x80,%edx
call   1070 <BIO_indent@plt>
test   %eax,%eax
je     18d8 <ECPKParameters_print+0x628>
mov    %ebx,%edi
call   10b0 <OBJ_nid2sn@plt>
lea    0x94e(%rip),%rsi
mov    %r14,%rdi
mov    %eax,%edx
xor    %eax,%eax
call   10c0 <BIO_printf@plt>
test   %rax,%rax
jle    18d8 <ECPKParameters_print+0x628>
cmp    0x44(%rsp),%ebx
jne    1783 <ECPKParameters_print+0x4d3>
mov    %r12,%rdi
call   1080 <EC_GROUP_get_basis_type@plt>
test   %eax,%eax
je     18d8 <ECPKParameters_print+0x628>
mov    %eax,%ebx
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x80,%edx
call   1070 <BIO_indent@plt>
test   %eax,%eax
je     18d8 <ECPKParameters_print+0x628>
mov    %ebx,%edi
call   10b0 <OBJ_nid2sn@plt>
lea    0x90c(%rip),%rsi
mov    %r14,%rdi
mov    %eax,%edx
xor    %eax,%eax
call   10c0 <BIO_printf@plt>
test   %rax,%rax
jle    18d8 <ECPKParameters_print+0x628>
lea    0x900(%rip),%rsi
jmp    178a <ECPKParameters_print+0x4da>
mov    0x2864(%rip),%rax
mov    (%rax),%esi
jmp    162f <ECPKParameters_print+0x37f>
lea    0x8f5(%rip),%rsi
mov    %r14,%rdi
mov    0x30(%rsp),%rdx
mov    0x20(%rsp),%rbx
mov    %rbx,%rcx
mov    %ebp,%r8d
call   11b0 <ASN1_bn_print@plt>
test   %eax,%eax
je     18d8 <ECPKParameters_print+0x628>
lea    0x8d5(%rip),%rsi
mov    %r14,%rdi
mov    0x38(%rsp),%rdx
mov    %rbx,%rcx
mov    %ebp,%r8d
call   11b0 <ASN1_bn_print@plt>
test   %eax,%eax
mov    0x10(%rsp),%r12
je     180c <ECPKParameters_print+0x55c>
mov    %r13,%rbx
lea    0x8b5(%rip),%rsi
mov    %r14,%rdi
mov    %r12,%rdx
mov    0x20(%rsp),%rcx
mov    %ebp,%r8d
call   11b0 <ASN1_bn_print@plt>
test   %eax,%eax
je     18d8 <ECPKParameters_print+0x628>
mov    0x27ef(%rip),%rax
mov    0x58(%rsp),%rcx
cmp    (%rax),%rcx
jne    181a <ECPKParameters_print+0x56a>
lea    0x7f6(%rip),%rsi
jmp    183b <ECPKParameters_print+0x58b>
mov    0x18(%rsp),%r15
mov    0xc(%rsp),%esi
jmp    1640 <ECPKParameters_print+0x390>
mov    0x27a7(%rip),%rax
mov    0x58(%rsp),%rcx
cmp    (%rax),%rcx
jne    1834 <ECPKParameters_print+0x584>
lea    0x7e6(%rip),%rsi
jmp    183b <ECPKParameters_print+0x58b>
lea    0x7f7(%rip),%rsi
mov    %r14,%rdi
mov    0x28(%rsp),%rdx
mov    0x20(%rsp),%rcx
mov    %ebp,%r8d
call   11b0 <ASN1_bn_print@plt>
test   %eax,%eax
je     18d8 <ECPKParameters_print+0x628>
lea    0x833(%rip),%rsi
mov    %r14,%rdi
mov    0x18(%rsp),%rdx
mov    0x20(%rsp),%rcx
mov    %ebp,%r8d
call   11b0 <ASN1_bn_print@plt>
test   %eax,%eax
je     18d8 <ECPKParameters_print+0x628>
lea    0x81b(%rip),%rsi
mov    %r14,%rdi
mov    0x48(%rsp),%rdx
mov    0x20(%rsp),%rcx
mov    %ebp,%r8d
call   11b0 <ASN1_bn_print@plt>
test   %eax,%eax
je     18d8 <ECPKParameters_print+0x628>
mov    $0x1,%r13d
test   %rbx,%rbx
je     18e6 <ECPKParameters_print+0x636>
lea    0x7fb(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
mov    0x50(%rsp),%rcx
mov    %ebp,%r8d
call   1180 <print_bin@plt>
test   %eax,%eax
mov    0x18(%rsp),%r15
mov    0xc(%rsp),%esi
mov    0x10(%rsp),%r12
jne    1651 <ECPKParameters_print+0x3a1>
jmp    1640 <ECPKParameters_print+0x390>
mov    0x18(%rsp),%r15
mov    0xc(%rsp),%esi
jmp    163b <ECPKParameters_print+0x38b>
mov    0x18(%rsp),%r15
mov    0x10(%rsp),%r12
jmp    1651 <ECPKParameters_print+0x3a1>

LLVM IR (-O0):
@ERR_R_BIO_LIB = global i32 0
@ECPKParameters_print.gen_compressed = internal global i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i32 0, i32 0)
@.str = [24 x i8] c"Generator (compressed):\00"
@ECPKParameters_print.gen_uncompressed = internal global i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i32 0, i32 0)
@.str.1 = [26 x i8] c"Generator (uncompressed):\00"
@ECPKParameters_print.gen_hybrid = internal global i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i32 0, i32 0)
@.str.2 = [20 x i8] c"Generator (hybrid):\00"
@ERR_R_PASSED_NULL_PARAMETER = global i32 0
@ERR_R_MALLOC_FAILURE = global i32 0
@.str.3 = [13 x i8] c"ASN1 OID: %s\00"
@.str.4 = [2 x i8] c"\0A\00"
@NID_X9_62_characteristic_two_field = global i32 0
@ERR_R_EC_LIB = global i32 0
@.str.5 = [16 x i8] c"Field Type: %s\0A\00"
@.str.6 = [16 x i8] c"Basis Type: %s\0A\00"
@.str.7 = [12 x i8] c"Polynomial:\00"
@.str.8 = [7 x i8] c"Prime:\00"
@.str.9 = [6 x i8] c"A: \00"
@.str.10 = [6 x i8] c"B: \00"
@POINT_CONVERSION_COMPRESSED = global i64 0
@POINT_CONVERSION_UNCOMPRESSED = global i64 0
@.str.11 = [8 x i8] c"Order: \00"
@.str.12 = [11 x i8] c"Cofactor: \00"
@.str.13 = [6 x i8] c"Seed:\00"
@EC_F_ECPKPARAMETERS_PRINT = global i32 0
define i32 @ECPKParameters_print(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca i32*
%20 = alloca i8*
%21 = alloca i64
%22 = alloca i32
%23 = alloca i32
%24 = alloca i64
%25 = alloca i32
%26 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
store i8* null, i8** %7
store i64 0, i64* %8
store i32 0, i32* %10
%27 = load i32, i32* @ERR_R_BIO_LIB
store i32 %27, i32* %11
store i32* null, i32** %12
store i32* null, i32** %13
store i32* null, i32** %14
store i32* null, i32** %15
store i32* null, i32** %16
store i32* null, i32** %17
store i32* null, i32** %18
store i32* null, i32** %19
store i64 0, i64* %21
%28 = load i32*, i32** %5
%29 = icmp ne i32* %28, null
br i1 %29, label %32, label %30
30: ; preds = %3
%31 = load i32, i32* @ERR_R_PASSED_NULL_PARAMETER
store i32 %31, i32* %11
br label %362
32: ; preds = %3
%33 = call i32* (...) @BN_CTX_new()
store i32* %33, i32** %12
%34 = load i32*, i32** %12
%35 = icmp eq i32* %34, null
br i1 %35, label %36, label %38
36: ; preds = %32
%37 = load i32, i32* @ERR_R_MALLOC_FAILURE
store i32 %37, i32* %11
br label %362
38: ; preds = %32
%39 = load i32*, i32** %5
%40 = call i64 @EC_GROUP_get_asn1_flag(i32* %39)
%41 = icmp ne i64 %40, 0
br i1 %41, label %42, label %67
42: ; preds = %38
%43 = load i32*, i32** %4
%44 = load i32, i32* %6
%45 = call i32 @BIO_indent(i32* %43, i32 %44, i32 128)
%46 = icmp ne i32 %45, 0
br i1 %46, label %48, label %47
47: ; preds = %42
br label %362
48: ; preds = %42
%49 = load i32*, i32** %5
%50 = call i32 @EC_GROUP_get_curve_name(i32* %49)
store i32 %50, i32* %22
%51 = load i32, i32* %22
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %54
53: ; preds = %48
br label %362
54: ; preds = %48
%55 = load i32*, i32** %4
%56 = load i32, i32* %22
%57 = call i32 @OBJ_nid2sn(i32 %56)
%58 = call i64 (i32*, i8*, ...) @BIO_printf(i32* %55, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %57)
%59 = icmp sle i64 %58, 0
br i1 %59, label %60, label %61
60: ; preds = %54
br label %362
61: ; preds = %54
%62 = load i32*, i32** %4
%63 = call i64 (i32*, i8*, ...) @BIO_printf(i32* %62, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%64 = icmp sle i64 %63, 0
br i1 %64, label %65, label %66
65: ; preds = %61
br label %362
66: ; preds = %61
br label %361
67: ; preds = %38
store i32 0, i32* %23
%68 = load i32*, i32** %5
%69 = call i32 @EC_GROUP_method_of(i32* %68)
%70 = call i32 @EC_METHOD_get_field_type(i32 %69)
store i32 %70, i32* %25
%71 = load i32, i32* %25
%72 = load i32, i32* @NID_X9_62_characteristic_two_field
%73 = icmp eq i32 %71, %72
br i1 %73, label %74, label %75
74: ; preds = %67
store i32 1, i32* %23
br label %75
75: ; preds = %74, %67
%76 = call i32* (...) @BN_new()
store i32* %76, i32** %14
%77 = icmp eq i32* %76, null
br i1 %77, label %90, label %78
78: ; preds = %75
%79 = call i32* (...) @BN_new()
store i32* %79, i32** %15
%80 = icmp eq i32* %79, null
br i1 %80, label %90, label %81
81: ; preds = %78
%82 = call i32* (...) @BN_new()
store i32* %82, i32** %16
%83 = icmp eq i32* %82, null
br i1 %83, label %90, label %84
84: ; preds = %81
%85 = call i32* (...) @BN_new()
store i32* %85, i32** %18
%86 = icmp eq i32* %85, null
br i1 %86, label %90, label %87
87: ; preds = %84
%88 = call i32* (...) @BN_new()
store i32* %88, i32** %19
%89 = icmp eq i32* %88, null
br i1 %89, label %90, label %92
90: ; preds = %87, %84, %81, %78, %75
%91 = load i32, i32* @ERR_R_MALLOC_FAILURE
store i32 %91, i32* %11
br label %362
92: ; preds = %87
%93 = load i32, i32* %23
%94 = icmp ne i32 %93, 0
br i1 %94, label %95, label %106
95: ; preds = %92
%96 = load i32*, i32** %5
%97 = load i32*, i32** %14
%98 = load i32*, i32** %15
%99 = load i32*, i32** %16
%100 = load i32*, i32** %12
%101 = call i32 @EC_GROUP_get_curve_GF2m(i32* %96, i32* %97, i32* %98, i32* %99, i32* %100)
%102 = icmp ne i32 %101, 0
br i1 %102, label %105, label %103
103: ; preds = %95
%104 = load i32, i32* @ERR_R_EC_LIB
store i32 %104, i32* %11
br label %362
105: ; preds = %95
br label %117
106: ; preds = %92
%107 = load i32*, i32** %5
%108 = load i32*, i32** %14
%109 = load i32*, i32** %15
%110 = load i32*, i32** %16
%111 = load i32*, i32** %12
%112 = call i32 @EC_GROUP_get_curve_GFp(i32* %107, i32* %108, i32* %109, i32* %110, i32* %111)
%113 = icmp ne i32 %112, 0
br i1 %113, label %116, label %114
114: ; preds = %106
%115 = load i32, i32* @ERR_R_EC_LIB
store i32 %115, i32* %11
br label %362
116: ; preds = %106
br label %117
117: ; preds = %116, %105
%118 = load i32*, i32** %5
%119 = call i32* @EC_GROUP_get0_generator(i32* %118)
store i32* %119, i32** %13
%120 = icmp eq i32* %119, null
br i1 %120, label %121, label %123
121: ; preds = %117
%122 = load i32, i32* @ERR_R_EC_LIB
store i32 %122, i32* %11
br label %362
123: ; preds = %117
%124 = load i32*, i32** %5
%125 = load i32*, i32** %18
%126 = call i32 @EC_GROUP_get_order(i32* %124, i32* %125, i32* null)
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %133
128: ; preds = %123
%129 = load i32*, i32** %5
%130 = load i32*, i32** %19
%131 = call i32 @EC_GROUP_get_cofactor(i32* %129, i32* %130, i32* null)
%132 = icmp ne i32 %131, 0
br i1 %132, label %135, label %133
133: ; preds = %128, %123
%134 = load i32, i32* @ERR_R_EC_LIB
store i32 %134, i32* %11
br label %362
135: ; preds = %128
%136 = load i32*, i32** %5
%137 = call i64 @EC_GROUP_get_point_conversion_form(i32* %136)
store i64 %137, i64* %24
%138 = load i32*, i32** %5
%139 = load i32*, i32** %13
%140 = load i64, i64* %24
%141 = load i32*, i32** %12
%142 = call i32* @EC_POINT_point2bn(i32* %138, i32* %139, i64 %140, i32* null, i32* %141)
store i32* %142, i32** %17
%143 = icmp eq i32* %142, null
br i1 %143, label %144, label %146
144: ; preds = %135
%145 = load i32, i32* @ERR_R_EC_LIB
store i32 %145, i32* %11
br label %362
146: ; preds = %135
%147 = load i32*, i32** %14
%148 = call i64 @BN_num_bytes(i32* %147)
store i64 %148, i64* %8
%149 = load i64, i64* %8
%150 = load i32*, i32** %15
%151 = call i64 @BN_num_bytes(i32* %150)
store i64 %151, i64* %9
%152 = icmp ult i64 %149, %151
br i1 %152, label %153, label %155
153: ; preds = %146
%154 = load i64, i64* %9
store i64 %154, i64* %8
br label %155
155: ; preds = %153, %146
%156 = load i64, i64* %8
%157 = load i32*, i32** %16
%158 = call i64 @BN_num_bytes(i32* %157)
store i64 %158, i64* %9
%159 = icmp ult i64 %156, %158
br i1 %159, label %160, label %162
160: ; preds = %155
%161 = load i64, i64* %9
store i64 %161, i64* %8
br label %162
162: ; preds = %160, %155
%163 = load i64, i64* %8
%164 = load i32*, i32** %17
%165 = call i64 @BN_num_bytes(i32* %164)
store i64 %165, i64* %9
%166 = icmp ult i64 %163, %165
br i1 %166, label %167, label %169
167: ; preds = %162
%168 = load i64, i64* %9
store i64 %168, i64* %8
br label %169
169: ; preds = %167, %162
%170 = load i64, i64* %8
%171 = load i32*, i32** %18
%172 = call i64 @BN_num_bytes(i32* %171)
store i64 %172, i64* %9
%173 = icmp ult i64 %170, %172
br i1 %173, label %174, label %176
174: ; preds = %169
%175 = load i64, i64* %9
store i64 %175, i64* %8
br label %176
176: ; preds = %174, %169
%177 = load i64, i64* %8
%178 = load i32*, i32** %19
%179 = call i64 @BN_num_bytes(i32* %178)
store i64 %179, i64* %9
%180 = icmp ult i64 %177, %179
br i1 %180, label %181, label %183
181: ; preds = %176
%182 = load i64, i64* %9
store i64 %182, i64* %8
br label %183
183: ; preds = %181, %176
%184 = load i32*, i32** %5
%185 = call i8* @EC_GROUP_get0_seed(i32* %184)
store i8* %185, i8** %20
%186 = icmp ne i8* %185, null
br i1 %186, label %187, label %190
187: ; preds = %183
%188 = load i32*, i32** %5
%189 = call i64 @EC_GROUP_get_seed_len(i32* %188)
store i64 %189, i64* %21
br label %190
190: ; preds = %187, %183
%191 = load i64, i64* %8
%192 = add i64 %191, 10
store i64 %192, i64* %8
%193 = load i64, i64* %8
%194 = call i8* @malloc(i64 %193)
store i8* %194, i8** %7
%195 = icmp eq i8* %194, null
br i1 %195, label %196, label %198
196: ; preds = %190
%197 = load i32, i32* @ERR_R_MALLOC_FAILURE
store i32 %197, i32* %11
br label %362
198: ; preds = %190
%199 = load i32*, i32** %4
%200 = load i32, i32* %6
%201 = call i32 @BIO_indent(i32* %199, i32 %200, i32 128)
%202 = icmp ne i32 %201, 0
br i1 %202, label %204, label %203
203: ; preds = %198
br label %362
204: ; preds = %198
%205 = load i32*, i32** %4
%206 = load i32, i32* %25
%207 = call i32 @OBJ_nid2sn(i32 %206)
%208 = call i64 (i32*, i8*, ...) @BIO_printf(i32* %205, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %207)
%209 = icmp sle i64 %208, 0
br i1 %209, label %210, label %211
210: ; preds = %204
br label %362
211: ; preds = %204
%212 = load i32, i32* %23
%213 = icmp ne i32 %212, 0
br i1 %213, label %214, label %245
214: ; preds = %211
%215 = load i32*, i32** %5
%216 = call i32 @EC_GROUP_get_basis_type(i32* %215)
store i32 %216, i32* %26
%217 = load i32, i32* %26
%218 = icmp eq i32 %217, 0
br i1 %218, label %219, label %220
219: ; preds = %214
br label %362
220: ; preds = %214
%221 = load i32*, i32** %4
%222 = load i32, i32* %6
%223 = call i32 @BIO_indent(i32* %221, i32 %222, i32 128)
%224 = icmp ne i32 %223, 0
br i1 %224, label %226, label %225
225: ; preds = %220
br label %362
226: ; preds = %220
%227 = load i32*, i32** %4
%228 = load i32, i32* %26
%229 = call i32 @OBJ_nid2sn(i32 %228)
%230 = call i64 (i32*, i8*, ...) @BIO_printf(i32* %227, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %229)
%231 = icmp sle i64 %230, 0
br i1 %231, label %232, label %233
232: ; preds = %226
br label %362
233: ; preds = %226
%234 = load i32*, i32** %14
%235 = icmp ne i32* %234, null
br i1 %235, label %236, label %244
236: ; preds = %233
%237 = load i32*, i32** %4
%238 = load i32*, i32** %14
%239 = load i8*, i8** %7
%240 = load i32, i32* %6
%241 = call i32 @ASN1_bn_print(i32* %237, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32* %238, i8* %239, i32 %240)
%242 = icmp ne i32 %241, 0
br i1 %242, label %244, label %243
243: ; preds = %236
br label %362
244: ; preds = %236, %233
br label %257
245: ; preds = %211
%246 = load i32*, i32** %14
%247 = icmp ne i32* %246, null
br i1 %247, label %248, label %256
248: ; preds = %245
%249 = load i32*, i32** %4
%250 = load i32*, i32** %14
%251 = load i8*, i8** %7
%252 = load i32, i32* %6
%253 = call i32 @ASN1_bn_print(i32* %249, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32* %250, i8* %251, i32 %252)
%254 = icmp ne i32 %253, 0
br i1 %254, label %256, label %255
255: ; preds = %248
br label %362
256: ; preds = %248, %245
br label %257
257: ; preds = %256, %244
%258 = load i32*, i32** %15
%259 = icmp ne i32* %258, null
br i1 %259, label %260, label %268
260: ; preds = %257
%261 = load i32*, i32** %4
%262 = load i32*, i32** %15
%263 = load i8*, i8** %7
%264 = load i32, i32* %6
%265 = call i32 @ASN1_bn_print(i32* %261, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32* %262, i8* %263, i32 %264)
%266 = icmp ne i32 %265, 0
br i1 %266, label %268, label %267
267: ; preds = %260
br label %362
268: ; preds = %260, %257
%269 = load i32*, i32** %16
%270 = icmp ne i32* %269, null
br i1 %270, label %271, label %279
271: ; preds = %268
%272 = load i32*, i32** %4
%273 = load i32*, i32** %16
%274 = load i8*, i8** %7
%275 = load i32, i32* %6
%276 = call i32 @ASN1_bn_print(i32* %272, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i32* %273, i8* %274, i32 %275)
%277 = icmp ne i32 %276, 0
br i1 %277, label %279, label %278
278: ; preds = %271
br label %362
279: ; preds = %271, %268
%280 = load i64, i64* %24
%281 = load i64, i64* @POINT_CONVERSION_COMPRESSED
%282 = icmp eq i64 %280, %281
br i1 %282, label %283, label %296
283: ; preds = %279
%284 = load i32*, i32** %17
%285 = icmp ne i32* %284, null
br i1 %285, label %286, label %295
286: ; preds = %283
%287 = load i32*, i32** %4
%288 = load i8*, i8** @ECPKParameters_print.gen_compressed
%289 = load i32*, i32** %17
%290 = load i8*, i8** %7
%291 = load i32, i32* %6
%292 = call i32 @ASN1_bn_print(i32* %287, i8* %288, i32* %289, i8* %290, i32 %291)
%293 = icmp ne i32 %292, 0
br i1 %293, label %295, label %294
294: ; preds = %286
br label %362
295: ; preds = %286, %283
br label %327
296: ; preds = %279
%297 = load i64, i64* %24
%298 = load i64, i64* @POINT_CONVERSION_UNCOMPRESSED
%299 = icmp eq i64 %297, %298
br i1 %299, label %300, label %313
300: ; preds = %296
%301 = load i32*, i32** %17
%302 = icmp ne i32* %301, null
br i1 %302, label %303, label %312
303: ; preds = %300
%304 = load i32*, i32** %4
%305 = load i8*, i8** @ECPKParameters_print.gen_uncompressed
%306 = load i32*, i32** %17
%307 = load i8*, i8** %7
%308 = load i32, i32* %6
%309 = call i32 @ASN1_bn_print(i32* %304, i8* %305, i32* %306, i8* %307, i32 %308)
%310 = icmp ne i32 %309, 0
br i1 %310, label %312, label %311
311: ; preds = %303
br label %362
312: ; preds = %303, %300
br label %326
313: ; preds = %296
%314 = load i32*, i32** %17
%315 = icmp ne i32* %314, null
br i1 %315, label %316, label %325
316: ; preds = %313
%317 = load i32*, i32** %4
%318 = load i8*, i8** @ECPKParameters_print.gen_hybrid
%319 = load i32*, i32** %17
%320 = load i8*, i8** %7
%321 = load i32, i32* %6
%322 = call i32 @ASN1_bn_print(i32* %317, i8* %318, i32* %319, i8* %320, i32 %321)
%323 = icmp ne i32 %322, 0
br i1 %323, label %325, label %324
324: ; preds = %316
br label %362
325: ; preds = %316, %313
br label %326
326: ; preds = %325, %312
br label %327
327: ; preds = %326, %295
%328 = load i32*, i32** %18
%329 = icmp ne i32* %328, null
br i1 %329, label %330, label %338
330: ; preds = %327
%331 = load i32*, i32** %4
%332 = load i32*, i32** %18
%333 = load i8*, i8** %7
%334 = load i32, i32* %6
%335 = call i32 @ASN1_bn_print(i32* %331, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i32* %332, i8* %333, i32 %334)
%336 = icmp ne i32 %335, 0
br i1 %336, label %338, label %337
337: ; preds = %330
br label %362
338: ; preds = %330, %327
%339 = load i32*, i32** %19
%340 = icmp ne i32* %339, null
br i1 %340, label %341, label %349
341: ; preds = %338
%342 = load i32*, i32** %4
%343 = load i32*, i32** %19
%344 = load i8*, i8** %7
%345 = load i32, i32* %6
%346 = call i32 @ASN1_bn_print(i32* %342, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i32* %343, i8* %344, i32 %345)
%347 = icmp ne i32 %346, 0
br i1 %347, label %349, label %348
348: ; preds = %341
br label %362
349: ; preds = %341, %338
%350 = load i8*, i8** %20
%351 = icmp ne i8* %350, null
br i1 %351, label %352, label %360
352: ; preds = %349
%353 = load i32*, i32** %4
%354 = load i8*, i8** %20
%355 = load i64, i64* %21
%356 = load i32, i32* %6
%357 = call i32 @print_bin(i32* %353, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i8* %354, i64 %355, i32 %356)
%358 = icmp ne i32 %357, 0
br i1 %358, label %360, label %359
359: ; preds = %352
br label %362
360: ; preds = %352, %349
br label %361
361: ; preds = %360, %66
store i32 1, i32* %10
br label %362
362: ; preds = %361, %359, %348, %337, %324, %311, %294, %278, %267, %255, %243, %232, %225, %219, %210, %203, %196, %144, %133, %121, %114, %103, %90, %65, %60, %53, %47, %36, %30
%363 = load i32, i32* %10
%364 = icmp ne i32 %363, 0
br i1 %364, label %369, label %365
365: ; preds = %362
%366 = load i32, i32* @EC_F_ECPKPARAMETERS_PRINT
%367 = load i32, i32* %11
%368 = call i32 @ECerr(i32 %366, i32 %367)
br label %369
369: ; preds = %365, %362
%370 = load i32*, i32** %14
%371 = icmp ne i32* %370, null
br i1 %371, label %372, label %375
372: ; preds = %369
%373 = load i32*, i32** %14
%374 = call i32 @BN_free(i32* %373)
br label %375
375: ; preds = %372, %369
%376 = load i32*, i32** %15
%377 = icmp ne i32* %376, null
br i1 %377, label %378, label %381
378: ; preds = %375
%379 = load i32*, i32** %15
%380 = call i32 @BN_free(i32* %379)
br label %381
381: ; preds = %378, %375
%382 = load i32*, i32** %16
%383 = icmp ne i32* %382, null
br i1 %383, label %384, label %387
384: ; preds = %381
%385 = load i32*, i32** %16
%386 = call i32 @BN_free(i32* %385)
br label %387
387: ; preds = %384, %381
%388 = load i32*, i32** %17
%389 = icmp ne i32* %388, null
br i1 %389, label %390, label %393
390: ; preds = %387
%391 = load i32*, i32** %17
%392 = call i32 @BN_free(i32* %391)
br label %393
393: ; preds = %390, %387
%394 = load i32*, i32** %18
%395 = icmp ne i32* %394, null
br i1 %395, label %396, label %399
396: ; preds = %393
%397 = load i32*, i32** %18
%398 = call i32 @BN_free(i32* %397)
br label %399
399: ; preds = %396, %393
%400 = load i32*, i32** %19
%401 = icmp ne i32* %400, null
br i1 %401, label %402, label %405
402: ; preds = %399
%403 = load i32*, i32** %19
%404 = call i32 @BN_free(i32* %403)
br label %405
405: ; preds = %402, %399
%406 = load i32*, i32** %12
%407 = icmp ne i32* %406, null
br i1 %407, label %408, label %411
408: ; preds = %405
%409 = load i32*, i32** %12
%410 = call i32 @BN_CTX_free(i32* %409)
br label %411
411: ; preds = %408, %405
%412 = load i8*, i8** %7
%413 = call i32 @free(i8* %412)
%414 = load i32, i32* %10
ret i32 %414
}

LLVM IR (-O2):
@ERR_R_BIO_LIB = global i32 0
@.str = [24 x i8] c"Generator (compressed):\00"
@.str.1 = [26 x i8] c"Generator (uncompressed):\00"
@.str.2 = [20 x i8] c"Generator (hybrid):\00"
@ERR_R_PASSED_NULL_PARAMETER = global i32 0
@ERR_R_MALLOC_FAILURE = global i32 0
@.str.3 = [13 x i8] c"ASN1 OID: %s\00"
@.str.4 = [2 x i8] c"\0A\00"
@NID_X9_62_characteristic_two_field = global i32 0
@ERR_R_EC_LIB = global i32 0
@.str.5 = [16 x i8] c"Field Type: %s\0A\00"
@.str.6 = [16 x i8] c"Basis Type: %s\0A\00"
@.str.7 = [12 x i8] c"Polynomial:\00"
@.str.8 = [7 x i8] c"Prime:\00"
@.str.9 = [6 x i8] c"A: \00"
@.str.10 = [6 x i8] c"B: \00"
@POINT_CONVERSION_COMPRESSED = global i64 0
@POINT_CONVERSION_UNCOMPRESSED = global i64 0
@.str.11 = [8 x i8] c"Order: \00"
@.str.12 = [11 x i8] c"Cofactor: \00"
@.str.13 = [6 x i8] c"Seed:\00"
@EC_F_ECPKPARAMETERS_PRINT = global i32 0
define i32 @ECPKParameters_print(i32* %0, i32* %1, i32 %2) {
%4 = load i32, i32* @ERR_R_BIO_LIB
%5 = icmp eq i32* %1, null
br i1 %5, label %210, label %6
6: ; preds = %3
%7 = tail call i32* (...) @BN_CTX_new()
%8 = icmp eq i32* %7, null
br i1 %8, label %210, label %9
9: ; preds = %6
%10 = tail call i64 @EC_GROUP_get_asn1_flag(i32* %1)
%11 = icmp eq i64 %10, 0
br i1 %11, label %25, label %12
12: ; preds = %9
%13 = tail call i32 @BIO_indent(i32* %0, i32 %2, i32 128)
%14 = icmp eq i32 %13, 0
br i1 %14, label %215, label %15
15: ; preds = %12
%16 = tail call i32 @EC_GROUP_get_curve_name(i32* %1)
%17 = icmp eq i32 %16, 0
br i1 %17, label %215, label %18
18: ; preds = %15
%19 = tail call i32 @OBJ_nid2sn(i32 %16)
%20 = tail call i64 (i32*, i8*, ...) @BIO_printf(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %19)
%21 = icmp slt i64 %20, 1
br i1 %21, label %215, label %22
22: ; preds = %18
%23 = tail call i64 (i32*, i8*, ...) @BIO_printf(i32* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%24 = icmp slt i64 %23, 1
br i1 %24, label %215, label %218
25: ; preds = %9
%26 = tail call i32 @EC_GROUP_method_of(i32* %1)
%27 = tail call i32 @EC_METHOD_get_field_type(i32 %26)
%28 = load i32, i32* @NID_X9_62_characteristic_two_field
%29 = icmp eq i32 %27, %28
%30 = tail call i32* (...) @BN_new()
%31 = icmp eq i32* %30, null
br i1 %31, label %157, label %32
32: ; preds = %25
%33 = tail call i32* (...) @BN_new()
%34 = icmp eq i32* %33, null
br i1 %34, label %172, label %35
35: ; preds = %32
%36 = tail call i32* (...) @BN_new()
%37 = icmp eq i32* %36, null
br i1 %37, label %172, label %38
38: ; preds = %35
%39 = tail call i32* (...) @BN_new()
%40 = icmp eq i32* %39, null
br i1 %40, label %172, label %41
41: ; preds = %38
%42 = tail call i32* (...) @BN_new()
%43 = icmp eq i32* %42, null
br i1 %43, label %172, label %44
44: ; preds = %41
br i1 %29, label %45, label %50
45: ; preds = %44
%46 = tail call i32 @EC_GROUP_get_curve_GF2m(i32* %1, i32* %30, i32* %33, i32* %36, i32* %7)
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %55
48: ; preds = %45
%49 = load i32, i32* @ERR_R_EC_LIB
br label %161
50: ; preds = %44
%51 = tail call i32 @EC_GROUP_get_curve_GFp(i32* %1, i32* %30, i32* %33, i32* %36, i32* %7)
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %55
53: ; preds = %50
%54 = load i32, i32* @ERR_R_EC_LIB
br label %161
55: ; preds = %50, %45
%56 = tail call i32* @EC_GROUP_get0_generator(i32* %1)
%57 = icmp eq i32* %56, null
br i1 %57, label %58, label %60
58: ; preds = %55
%59 = load i32, i32* @ERR_R_EC_LIB
br label %161
60: ; preds = %55
%61 = tail call i32 @EC_GROUP_get_order(i32* %1, i32* %39, i32* null)
%62 = icmp eq i32 %61, 0
br i1 %62, label %66, label %63
63: ; preds = %60
%64 = tail call i32 @EC_GROUP_get_cofactor(i32* %1, i32* %42, i32* null)
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %63, %60
%67 = load i32, i32* @ERR_R_EC_LIB
br label %161
68: ; preds = %63
%69 = tail call i64 @EC_GROUP_get_point_conversion_form(i32* %1)
%70 = tail call i32* @EC_POINT_point2bn(i32* %1, i32* %56, i64 %69, i32* null, i32* %7)
%71 = icmp eq i32* %70, null
br i1 %71, label %72, label %74
72: ; preds = %68
%73 = load i32, i32* @ERR_R_EC_LIB
br label %161
74: ; preds = %68
%75 = tail call i64 @BN_num_bytes(i32* %30)
%76 = tail call i64 @BN_num_bytes(i32* %33)
%77 = icmp ult i64 %75, %76
%78 = select i1 %77, i64 %76, i64 %75
%79 = tail call i64 @BN_num_bytes(i32* %36)
%80 = icmp ult i64 %78, %79
%81 = select i1 %80, i64 %79, i64 %78
%82 = tail call i64 @BN_num_bytes(i32* %70)
%83 = icmp ult i64 %81, %82
%84 = select i1 %83, i64 %82, i64 %81
%85 = tail call i64 @BN_num_bytes(i32* %39)
%86 = icmp ult i64 %84, %85
%87 = select i1 %86, i64 %85, i64 %84
%88 = tail call i64 @BN_num_bytes(i32* %42)
%89 = icmp ult i64 %87, %88
%90 = select i1 %89, i64 %88, i64 %87
%91 = tail call i8* @EC_GROUP_get0_seed(i32* %1)
%92 = icmp eq i8* %91, null
br i1 %92, label %95, label %93
93: ; preds = %74
%94 = tail call i64 @EC_GROUP_get_seed_len(i32* %1)
br label %95
95: ; preds = %93, %74
%96 = phi i64 [ %94, %93 ], [ 0, %74 ]
%97 = add i64 %90, 10
%98 = tail call i8* @malloc(i64 %97)
%99 = icmp eq i8* %98, null
br i1 %99, label %100, label %102
100: ; preds = %95
%101 = load i32, i32* @ERR_R_MALLOC_FAILURE
br label %161
102: ; preds = %95
%103 = tail call i32 @BIO_indent(i32* %0, i32 %2, i32 128)
%104 = icmp eq i32 %103, 0
br i1 %104, label %161, label %105
105: ; preds = %102
%106 = tail call i32 @OBJ_nid2sn(i32 %27)
%107 = tail call i64 (i32*, i8*, ...) @BIO_printf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %106)
%108 = icmp slt i64 %107, 1
br i1 %108, label %161, label %109
109: ; preds = %105
br i1 %29, label %110, label %123
110: ; preds = %109
%111 = tail call i32 @EC_GROUP_get_basis_type(i32* %1)
%112 = icmp eq i32 %111, 0
br i1 %112, label %161, label %113
113: ; preds = %110
%114 = tail call i32 @BIO_indent(i32* %0, i32 %2, i32 128)
%115 = icmp eq i32 %114, 0
br i1 %115, label %161, label %116
116: ; preds = %113
%117 = tail call i32 @OBJ_nid2sn(i32 %111)
%118 = tail call i64 (i32*, i8*, ...) @BIO_printf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0), i32 %117)
%119 = icmp slt i64 %118, 1
br i1 %119, label %161, label %120
120: ; preds = %116
%121 = tail call i32 @ASN1_bn_print(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i32* %30, i8* %98, i32 %2)
%122 = icmp eq i32 %121, 0
br i1 %122, label %161, label %126
123: ; preds = %109
%124 = tail call i32 @ASN1_bn_print(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32* %30, i8* %98, i32 %2)
%125 = icmp eq i32 %124, 0
br i1 %125, label %161, label %126
126: ; preds = %120, %123
%127 = tail call i32 @ASN1_bn_print(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32* %33, i8* %98, i32 %2)
%128 = icmp eq i32 %127, 0
br i1 %128, label %161, label %129
129: ; preds = %126
%130 = tail call i32 @ASN1_bn_print(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i32* %36, i8* %98, i32 %2)
%131 = icmp eq i32 %130, 0
br i1 %131, label %161, label %132
132: ; preds = %129
%133 = load i64, i64* @POINT_CONVERSION_COMPRESSED
%134 = icmp eq i64 %69, %133
br i1 %134, label %135, label %138
135: ; preds = %132
%136 = tail call i32 @ASN1_bn_print(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32* %70, i8* %98, i32 %2)
%137 = icmp eq i32 %136, 0
br i1 %137, label %161, label %147
138: ; preds = %132
%139 = load i64, i64* @POINT_CONVERSION_UNCOMPRESSED
%140 = icmp eq i64 %69, %139
br i1 %140, label %141, label %144
141: ; preds = %138
%142 = tail call i32 @ASN1_bn_print(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32* %70, i8* %98, i32 %2)
%143 = icmp eq i32 %142, 0
br i1 %143, label %161, label %147
144: ; preds = %138
%145 = tail call i32 @ASN1_bn_print(i32* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32* %70, i8* %98, i32 %2)
%146 = icmp eq i32 %145, 0
br i1 %146, label %161, label %147
147: ; preds = %135, %144, %141
%148 = tail call i32 @ASN1_bn_print(i32* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i32* %39, i8* %98, i32 %2)
%149 = icmp eq i32 %148, 0
br i1 %149, label %161, label %150
150: ; preds = %147
%151 = tail call i32 @ASN1_bn_print(i32* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), i32* %42, i8* %98, i32 %2)
%152 = icmp eq i32 %151, 0
br i1 %152, label %161, label %153
153: ; preds = %150
br i1 %92, label %167, label %154
154: ; preds = %153
%155 = tail call i32 @print_bin(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.13, i64 0, i64 0), i8* %91, i64 %96, i32 %2)
%156 = icmp eq i32 %155, 0
br i1 %156, label %161, label %167
157: ; preds = %25
%158 = load i32, i32* @ERR_R_MALLOC_FAILURE
%159 = load i32, i32* @EC_F_ECPKPARAMETERS_PRINT
%160 = tail call i32 @ECerr(i32 %159, i32 %158)
br label %218
161: ; preds = %116, %113, %110, %154, %150, %147, %144, %141, %135, %129, %126, %123, %105, %102, %53, %48, %66, %100, %72, %58, %120
%162 = phi i32 [ %4, %120 ], [ %59, %58 ], [ %73, %72 ], [ %101, %100 ], [ %67, %66 ], [ %49, %48 ], [ %54, %53 ], [ %4, %102 ], [ %4, %105 ], [ %4, %123 ], [ %4, %126 ], [ %4, %129 ], [ %4, %135 ], [ %4, %141 ], [ %4, %144 ], [ %4, %147 ], [ %4, %150 ], [ %4, %154 ], [ %4, %110 ], [ %4, %113 ], [ %4, %116 ]
%163 = phi i32* [ %70, %120 ], [ null, %58 ], [ null, %72 ], [ %70, %100 ], [ null, %66 ], [ null, %48 ], [ null, %53 ], [ %70, %102 ], [ %70, %105 ], [ %70, %123 ], [ %70, %126 ], [ %70, %129 ], [ %70, %135 ], [ %70, %141 ], [ %70, %144 ], [ %70, %147 ], [ %70, %150 ], [ %70, %154 ], [ %70, %110 ], [ %70, %113 ], [ %70, %116 ]
%164 = phi i8* [ %98, %120 ], [ null, %58 ], [ null, %72 ], [ null, %100 ], [ null, %66 ], [ null, %48 ], [ null, %53 ], [ %98, %102 ], [ %98, %105 ], [ %98, %123 ], [ %98, %126 ], [ %98, %129 ], [ %98, %135 ], [ %98, %141 ], [ %98, %144 ], [ %98, %147 ], [ %98, %150 ], [ %98, %154 ], [ %98, %110 ], [ %98, %113 ], [ %98, %116 ]
%165 = load i32, i32* @EC_F_ECPKPARAMETERS_PRINT
%166 = tail call i32 @ECerr(i32 %165, i32 %162)
br label %167
167: ; preds = %161, %153, %154
%168 = phi i32* [ %70, %154 ], [ %70, %153 ], [ %163, %161 ]
%169 = phi i32 [ 1, %154 ], [ 1, %153 ], [ 0, %161 ]
%170 = phi i8* [ %98, %154 ], [ %98, %153 ], [ %164, %161 ]
%171 = tail call i32 @BN_free(i32* %30)
br label %180
172: ; preds = %32, %35, %38, %41
%173 = phi i32* [ %36, %41 ], [ %36, %38 ], [ null, %35 ], [ null, %32 ]
%174 = phi i32* [ %39, %41 ], [ null, %38 ], [ null, %35 ], [ null, %32 ]
%175 = load i32, i32* @ERR_R_MALLOC_FAILURE
%176 = load i32, i32* @EC_F_ECPKPARAMETERS_PRINT
%177 = tail call i32 @ECerr(i32 %176, i32 %175)
%178 = tail call i32 @BN_free(i32* %30)
%179 = icmp eq i32* %33, null
br i1 %179, label %188, label %180
180: ; preds = %167, %172
%181 = phi i8* [ %170, %167 ], [ null, %172 ]
%182 = phi i32 [ %169, %167 ], [ 0, %172 ]
%183 = phi i32* [ %42, %167 ], [ null, %172 ]
%184 = phi i32* [ %39, %167 ], [ %174, %172 ]
%185 = phi i32* [ %168, %167 ], [ null, %172 ]
%186 = phi i32* [ %36, %167 ], [ %173, %172 ]
%187 = tail call i32 @BN_free(i32* %33)
br label %188
188: ; preds = %180, %172
%189 = phi i8* [ %181, %180 ], [ null, %172 ]
%190 = phi i32 [ %182, %180 ], [ 0, %172 ]
%191 = phi i32* [ %183, %180 ], [ null, %172 ]
%192 = phi i32* [ %184, %180 ], [ %174, %172 ]
%193 = phi i32* [ %185, %180 ], [ null, %172 ]
%194 = phi i32* [ %186, %180 ], [ %173, %172 ]
%195 = icmp eq i32* %194, null
br i1 %195, label %198, label %196
196: ; preds = %188
%197 = tail call i32 @BN_free(i32* %194)
br label %198
198: ; preds = %196, %188
%199 = icmp eq i32* %193, null
br i1 %199, label %202, label %200
200: ; preds = %198
%201 = tail call i32 @BN_free(i32* %193)
br label %202
202: ; preds = %200, %198
%203 = icmp eq i32* %192, null
br i1 %203, label %206, label %204
204: ; preds = %202
%205 = tail call i32 @BN_free(i32* %192)
br label %206
206: ; preds = %204, %202
%207 = icmp eq i32* %191, null
br i1 %207, label %218, label %208
208: ; preds = %206
%209 = tail call i32 @BN_free(i32* %191)
br label %218
210: ; preds = %6, %3
%211 = phi i32* [ @ERR_R_PASSED_NULL_PARAMETER, %3 ], [ @ERR_R_MALLOC_FAILURE, %6 ]
%212 = load i32, i32* %211
%213 = load i32, i32* @EC_F_ECPKPARAMETERS_PRINT
%214 = tail call i32 @ECerr(i32 %213, i32 %212)
br label %222
215: ; preds = %22, %12, %15, %18
%216 = load i32, i32* @EC_F_ECPKPARAMETERS_PRINT
%217 = tail call i32 @ECerr(i32 %216, i32 %4)
br label %218
218: ; preds = %157, %206, %208, %22, %215
%219 = phi i32 [ 0, %215 ], [ 1, %22 ], [ %190, %208 ], [ %190, %206 ], [ 0, %157 ]
%220 = phi i8* [ null, %215 ], [ null, %22 ], [ %189, %208 ], [ %189, %206 ], [ null, %157 ]
%221 = tail call i32 @BN_CTX_free(i32* %7)
br label %222
222: ; preds = %210, %218
%223 = phi i32 [ %219, %218 ], [ 0, %210 ]
%224 = phi i8* [ %220, %218 ], [ null, %210 ]
%225 = tail call i32 @free(i8* %224)
ret i32 %223
}